Mtb up to a couple of hours, I’m quite happy with these decathlon boxers I use them in the gym too, hold everything in place and don’t get that horrible sweaty baws feeling from them.
Saddle shape makes a lot of difference though, I’ve just changed the saddle on my hard tail, I really wasn’t getting on well with the Fabric Scoop radius on there (fine with the flat one on my full sis though) and stuck the spesh power from my gravel bike on to try, it stayed on and I’ve had to buy another for the gravel bike.
For longer rides it’s either bibs or some lightly padded boxer type jobs that came with some Scott shorts I bought a few years ago.
As said above, bibs do lose their support after so many wears (I’ve got a couple of pairs of Morvelo ones that aren’t doing the job like they used to, but I can’t bring myself to Chuck them yet so they’ve been relegated to turbo use)