I have to say, I dehrydrate myself when I am worried to pee during a flight. I prefer being dehydrated than needing a pee in flight. That said, I never plan for flight over 3 hours and above 2 hours, I prepare many alternates/stops along the way to pee/relax/refuel in case of headwind. I am still a young pilot and I am not confident in m’y ability to stay focused more than 3 hours.