When sprites overlap and they have different background priority, Mesen will render that area by rendering sprites with background priority first, then render the background tile and finally render sprites with higher render priority. However these priority checks use the original ROM pixel instead of the HD replacement. See https://www.romhacking.net/forum/index.php?topic=26811.msg371646#msg371646
Thanks - I haven't forgotten! But my time has entirely been consumed by the SNES emulator (https://www.github.com/SourMesen/Mesen-S/), so I haven't had the chance to look at this yet.
When sprites overlap and they have different background priority, Mesen will render that area by rendering sprites with background priority first, then render the background tile and finally render sprites with higher render priority. However these priority checks use the original ROM pixel instead of the HD replacement. See https://www.romhacking.net/forum/index.php?topic=26811.msg371646#msg371646