What is the specific cycling adaptation you are training to gain?
On the flat, zone 5 efforts mean that you’re in the tucked in either the drops or on the hoods and spinning a higher gear (unless you are racing on gravel or really bad cobbles (which none of us would be, in all likelihood), in which case you a pushing a big gear, and may be more upright on the hoods or the tops). So for those efforts, you’d do them on the flats at a higher rpm and tucked like you would be in a race. On the trainer, same thing.
On 3-10 minute hills? Whatever you have to do to get over the hill. I’m a bigger cyclist (six one, 167), and I usually do 50% or more of a “VO2 climb” out of the saddle, pushing some stupid gear at 55-60 rpm. That works best for me. My training buddy sits and spins, but he has a much higher VLA than I do.
I’d say pick a local 4-5 minute hill and see what it takes for you to get up it the fastest that you can. Try stand and mash. Try sit and spin. Try sit and push at 80rpm. It will take a few months but eventually you’ll find the combination that works for you.
Bottom line? Flat VO2s, tuck and spin (It’s pretty difficult to try and repeat 90-95rpm and 155% of FTP over and over again on the flat, and anyway, the accelerations in a race call for a smaller gear and higher revs). Hills? Find out what works for you and do it.