Full-screen applications on 90 degree rotated external monitor incredibly laggy
The problem lies with the fact that the monitors are connected via DisplayLink. The DisplayLink drivers are notoriously known for having extremely bad performance when rotation is used. This has been a problem for years.

The same type of problem exists on other platforms such as for example Linux. My understanding is that at least part of the problem is that instead of the graphics hardware doing the rotation, it is actually done in software on the main CPU inside the DisplayLink driver. This makes it much slower than ordinary.

The only real solution is to use a different dock that doesn't use DisplayLink. Usually you would need a Thunderbolt 3 dock. Those usually offer DisplayPort and/or HDMI. You could also connect the rotated monitor directly to the MacBook Pro assuming you have a left-over Thunderbolt 3 port.