Personal view but I believe that to suggest that a FA on the flight deck during a toilet break is compromising her duties in the cabin is utter bo**ocks. The FA's duties on the FD are to ensure that legitimate access to the flight deck is not denied and that the safety of all passengers, crew and aircraft are not compromised, what, in the cruise, could be more important than that?
So how does the flight deck FA do that exactly when the remaining Pilot could easily destroy the aircraft in far less time than it takes for the other Pilot to zip up and return? And how does the FA do that exactly when one Pilot could easily destroy the aircraft even with the other Pilot sitting in their designated Pilot seat?
The truth is the only duty the FA is performing in the flight deck is that of appeasing the ignorant travelling public!