Why does it being docked change anything? The dock doesn’t add anything afaik.
It's a power issue. When undocked, more power is needed to just run the system, period. This means it cannot commit full power to running the gpu on the system, and it takes a performance hit.
When docked, the power is derived directly from the power supply, which is enough to allow the gpu to run at full capacity, thus giving best possible graphics and framerate.
That said, many switch games run at 720p undocked and 900p when docked, but the switch only upscales, meaning the graphics actually get muddier when docked on certain games, with Breath Of The Wild being one of the biggest culprits. I haven't really done much comparison docked vs. undocked of the textures to be sure about MK11 though.
For reference:
https://www.ign.com/articles/2017/01/13/nintendo-admits-switch-performance-upgrade-when-docked