From Digital Foundry...
"This is only a theory, but it does make sense based on the data available. Laying out the maths here, docking increases pixel count from 720p to 900p, a 56 per cent in resolution. However, memory bandwidth only rises by 20 per cent, from 1331MHz to 1600MHz. Bandwidth is shared between CPU and GPU, so the higher resolution in the home console mode may be sapping memory bandwidth away from the main processor cores, making us more prone to slowdown when the CPU is under load. Bandwidth concerns may also explain why resolution doesn't scale closer in line with the difference in clock-speeds (307.2MHz or 384MHz undocked, 768MHz docked). "
And not to mention the custom Tegra in the switch has way less memory bandwidth than a standard Tegra, in other words this is a bottleneck that will take a hardware revision rather than a patch to solve.