How to unflag/reset a flag again, when matching some conditions in onFlag event?
I'm guessing the problem is that in the onFlag event, the flag is still being created, so it can't be unflagged because it hasn't been fully saved yet.
But I think the bigger problem is that your code has a logic error-- validation should happen before the action, not after the action.
It looks like you are trying to do this:

When a user is flagged,
check if the flag meets certain &quot;unflag&quot; conditions,
if the conditions are met, unflag the user.

However, validation in Drupal usually is applied before something happens, not after.  Validation is not supposed to be a kill switch to stop a problem; you should stop the problem before it happens.
One reason to stop the problem before it happens is that you later may add code that does something when a node is flagged (for example, in hook_entity_insert()); in such a case, you would also have to undo the code in your flag event subscriber.
So, what you probably want to do is apply the validation login in hook_form_alter() so you can stop the flagging before it happens.