There are ways of creating oxygen onboard submarines. The only real limits to time submerged is the amount of food the boat can carry.
Here is a video by Destin from the Smarter Every Day youtube channel explaining oxygen generation onboard submarines. https://youtu.be/g3Ud6mHdhlQ
Electric kettle and french press.
It’s called a London Fog and it’s delicious.