I have a custom setup where I can quickly switch between windows and applications using keyboard shortcuts and save e.g. cursor positions.
I still prefer having the relevant material on-screen rather than switching between them. And it's due to the reason previously mentioned: for me it's faster to reference material that is on-screen at the same time rather than switching between them.
Perhaps this has something to do with the type of code bases one works with? I work quite a bit on legacy apps, where one has to reference both documentation, tests and git history (when it's of value), as well as a browser window to actually run the code. That'a already a lot of things to be switching between.
This workflow completely removes the need for a separate screen. A larger screen and higher resolution would be nice to have, but not for productivity reasons. I've found a 15.6" 1080p display to be sufficient with this setup, even though I have other screens I could use at the same time. It boils down to personal preference, but I doubt there's some "empirical evidence" that using more than one screen objectively leads to higher productivity.
Monitor #1: The page Monitor #2: The code Monitor #3: Mail, chat etc.
You can drop the third one, but at least two is kinda required. You can't just shove #1 and #2 on a single monitor or the page layout won't match the user's.
Can you share this evidence?
The thing is that one can only focus on a single monitor at a time. So productivity IME really depends on your windows manager. If I can quickly jump from code to documentation while looking at the same pixels without moving my neck or eyes, that seems like it would be more productive than changing focus to another screen and back.
I've been working on a single 1080p laptop display for years now, running Linux with bspwm. I've tried hooking up external displays to this setup, but I haven't found it increased my productivity. Sure, the extra real estate was nice, but shifting focus between monitors detracted from the experience enough that I always went back to a single screen. The comfort of having a portable setup and being able to work from anywhere is also a plus.