No problem.
Just give women their own subs.
Heck--go all the way: give women their own navy.
Just like with girl scouts and boy scouts.
Mix women and gays on subs, perfect mix, won’t have to worry about privacy or pregnancy, can even paint the sub pink.