Flight attendants have a specific position to stand or sit in the cockpit while we are using the restroom. In today's world of reinforced cockpit doors it's crucial that there is another member of the crew in the cockpit at all times while a CA/FO is in the lav.
I know of a number of airlines where this is not done.