That only 'fixes' it if you never want to use the scoreboard. So it's just a workaround not a fix. I've had the bug and been trapped on the scoreboard with no way to close it, even with the right click ui setting cleared from the options. Changing the setting is better than nothing but you can still get the bug.
Have tried changing to a different key and that also can end up with the issue of being stuck on the scoreboard occasionally. If you werent actively in the game at the time you cannot be killed and cannot leave the scoreboard, meaning you have to alt+f4 to get out of the situation.