If you use Extension:Sudo to become a user who is blocked from the wiki, and $wgBlockDisablesLogin=true, then the link Return to your account does not work to end the sudo session. If you click this link, taking you to /w/index.php?title=Special:Sudo&mode=unsudo, you continue to see the "Permission Error" message, and you remain in sudo mode.
This is MediaWiki 1.28.0 and Sudo 0.4.0.