After the introduction of the locked door policy we actually had a rule like that. However it simply didn't work out. The FAs are busy at nearly all times and as a result we couldn't go to the restroom which was ok on short flights, but simply impossible on longer ones. After a few months that rule vanished again and yup, we are alone in the flightdeck if one goes back to do whatever, same as you are when the other remains in the flightdeck but takes a nap, another allowed thing.