“Hiding” is being used as a present participle here (an action that the subject is currently engaged in performing), as opposed to “to hide” which describes an action to be taken in the future. So, one could interpret “the DM determines when circumstances are appropriate to hide” to mean they determine what you need to take the hide action and “the DM determines when circumstances are appropriate for hiding” to mean that when you are actively engaged in hiding, the DM determines if it’s appropriate for you to continue doing so. I’d call it a pretty tortured interpretation, but it does technically work to say that the phrasing suggests the DM could say “circumstances have changed such that it’s no longer appropriate for you to be hiding, therefore you lose the invisible condition.