I see no difference between what you want to do and having 2 bedrooms share one bathroom.
You need to have a door to each bath separating the shower area. Those doors should be able to be locked from the inside shower area so no one can accidentally enter the shower area from the other bath.
Just my opinion.
Good Luck!