As others have said, I think it gets a bit easier with time as you get used to it and figure out what strategies work best for you.
I kind of frame long trainer rides as an excuse to do some things I can’t often justify doing during the day- namely eating candy and watching too many movies
I go out of my way to pick “fun” snacks that wouldn’t be practical during an interval session or outdoor ride, movies that my partner wouldn’t like…so there are at least elements I feel like I ‘get to’ do rather than having to do, if that makes sense.
You can also look outside the typical entertainment options like zwift, TV shows etc- things like learning a language or listening to an audiobook typically require more mental input than just taking in what’s happening on a screen which can pass the time faster. Also worth picking a couple of things in case you’re not in the mood for the first one.
I usually get off the bike briefly every 60-75 min and stand as needed for saddle comfort, and for whatever reason I’ve found that turning the rest of the lights off helps. If you’re a social person there’s loads of indoor options there too!