Assuming D&D 5e, I think that might me up to the DM to allow/disallow depending on the situation. I'd allow it if someone just takes a quick ppek through the door and closes it instantly afterwards. Questions regarding rules in different games system aren't really meant for the roll20 forums, this is "Specific (roll20) use Questions& Macros", similar questions is better directed to game specific communities. In this case you could search for sage advice rulings regarding object interaction, this could have been talked about before. The DnD5e community here is so big that I think they actually could have a own forum to discuss general 5e stuff. I mean this is yet another example of DnD5e player asking general 5e question, which is commonplace, even to the point most don't even think of mentioning which system they are referring to.