In such a situation the room should have been closed pending the arrival of the PJ with the parents and other two children being moved to another accomodation.
One has to realise though that such an abduction is extremely rare so it was initially thought that she had merely wandered off. I believe this is what did happen and that she was taken from the nearby street after trying to follow Gerry. Whether this taking from the street was as a result of an accident is another possibility.
I think Madeleine was removed from the apartment by person or persons unknown. And I think there is plenty of circumstantial evidence to indicate that the German investigation is hitting very close to the mark.
On the other hand when one reads of the toleration of paedophilia in a holiday resort in an area where one's child stood a very fair chance of being assaulted in her bed the notion that a child wandering on her own stood a very
reasonable (highly likely) chance of wandering into one of these perverts is probably a valid one.
Which I believe has been looked at and dismissed.
Children on holiday in the Algarve had been assaulted under their own roof for years and the local police apparently never got close enough to get a sniff at the perpetrator smelly or not. Fourteen years after Madeleine's disappearance the local police are no closer ... but I think with some of the main players out of the equation there is not the same problem.