Rather then having two screens try the following setup.
An ultra wide monitor like:
https://www.lg.com/us/monitors/lg-29UM68-P-ultrawide-monitor
Then you have your code screen + browser/test/shell in split screen. it’s like having two full screens due to being ultra wide.
When I am away from my screen I can feel the drop in productivity having to shift between virtual desktops.
If you have a laptop you also get a 3rd screen that you could use for something else like docs.