This is a really interesting question actually, and yes, it definitely depends!
In theory it should be a slight advantage to be able to have a consistently lower resistance and thus to be able to select your cadence, but in practice I find it easier to sustain FTP-level power over longer time periods if I’m going up a simulated hill with resistance of around 5 - 10%.
So, I find a 40 min virtual climb at my FTP power is about as hard as 2x20 mins at FTP on the flat (e.g. in a Zwift workout), and definitely easier than a 40 min FTP session on the flat… That’s provided that the gradient of the simulated hill is relatively constant - unfortunately Zwift doesn’t really have any hills like this, so I usually use something like BigRingVR and Col du Telegraphe or whatever.
I’m not quite sure why this is, but suspect it’s down to a combination of factors. On a simulated hill with signifciant resistance I will alternate between sitting and standing, and I believe this enables me to sustain a slightly higher average power by alternating the use of different muscle groups. In theory you could do this on the flat just by going into really big gears, but in practice, you don’t…
So I wonder if there is a big psychological element at work - the simulation of the hill is good enough to allow you to switch into a learned pattern of behaviour that is familiar and practiced from riding real hills out of doors. There may also be an element of self-image at work - I percieve myself more as a climber than a rouleur, so perhaps I’m able to push harder on hills than someone who is not a good climber and is intimidated by them.
However - as soon as the gradient of a simulated hill becomes quite variable, there comes a point at which this is disadvantageous because you lose power overall by continually having to adapt to changes in gradient / resistance. So, I can’t quite sustain my FTP up Alpe du Zwift for 50 mins, despite being able to do it on other simulated hills of similar duration.