The front door of the apartment wasn't open though was it? Nor would a casual observer passing by be able to see if it was because of foliage and its recessed position.
I would never presume to enter anyone's property to close their front door under any other than prearranged circumstances, if I had any concerns at all I would deal with the situation accordingly either by summoning other neighbours or the police.
Fair enough. In your situation you would take some other action to prevent the little ones wandering out onto the road.
It could get tricky if you had an appointment to keep or a flight to catch.
As I said I look out for open farm gates. I have yet to actually close one, usually I find there is a reason it is open, and it seems safe enough so I move on.
When you ask "The front door of the apartment wasn't open though was it?" that has been the prime issue in my McCann study for the last year or so. I believe the evidence gathered so far points to a situation of anyone without a key cannot fully close the front door if they leave via the front door.
Therefore if Madeleine woke and wandered and left by the front door that door would be open. Remember Kate and David never found it open at the time of the alarm being raised.
But I contend this does not prove it had not being closed by someone else between the time Madeleine left (in this scenario) and when Kate found her missing (and IMO there was sufficient time available for someone to do this).
Someone who knew the front door could be closed from the inside and that one could leave by the patio door and close the child proof gates on the stairs (so the toddlers are then safe, as the prime concern is for the safety of the toddlers).
But if my theory is correct whoever did this would be left in an awkward situation of not knowing where Madeleine went to, as if she left by the front door and the other person leaves via the patio door they have two options as to which way to go to find her, like at the gate onto the footpath does one turn left or right.
It is better to lose one child than all three.