This patch fixes the bug where the game softlocks if $1411 (horizontal scrolling flag) is cleared (i.e. horizontal scrolling is disabled) while the screen is being scrolled with L/R. An infamous example of this scenario is scrolling an auto-scroll generator on screen with L/R (which is what the patch was originally made to fix).
Of course, spontaneously setting $1411 during a level can still result in a glitchy mess if the screen has to scroll (or rather, snap) too much to catch up. This is vanilla behavior and it's not what this patch intends to fix.
For the curious (technical information): This issue seems to stem from the routine at $00CDDD, which handles horizontal scrolling. One of the things it does is write $13FD (L/R scrolling flag) to $9D (sprites locked flag), then jump to another part of the routine which handles L/R scrolling if $13FD is set. If $1411 is clear, the routine will return prematurely. This usually fine, however unsetting the flag after sprites have been locked will prevent the game from updating scrolling, which will mean L/R scrolling will hang and keep sprites locked, which ends up practically softlocking the game. This was fixed by resetting L/R scrolling and unlocking sprites if they're locked, the screen is being L/R scrolled, and horizontal scrolling is disabled (all at the same time).
Does this unlocks $9D every frame? That could cause glitches with other ASMs that temporally locks $9D.
No, it doesn't, at least not all the time. It only unlocks $9D it if
$9D and $13FD are set and if $1411 is clear (the softlock happens when sprites are locked and L/R scroll is happening with horizontal movement turned off, the only instance I can think of where that's true is if you scroll an autoscroller on the screen with L/R).