To prevent multiple flagging events from triggering your flow multiple times, you will want to have a tacker function.
In SharePoint, create a List with a text field for MessageID. You can even use the built-in Title field for this if you want. I'll refer to it as MessageID for clarity.
In your flow, add a Get Items at the top targeting your new list, with an ODATA filter:
MessageID eq '[dynamic content from your trigger for the message ID]'
Next, add a Condition and have the left side be:
length(outputs('Get_items')?['body/value'])
The middle should be Greater Than and the right size the number zero
In the If Yes side, add a Terminate action and set it to Cancelled
In the If No side, add a Create Item action targeting your new list and add the Message ID from the trigger's dynamic content to the list.
This will, when your flow runs, check your new SharePoint List to see if the flow has already been run on this email. If it has, it will cancel the flow and stop processing. If it doesn't find a match, it will create an entry for this email and then keep running, creating the task.
With this simple tracker system you shouldn't get duplicate tasks from multiple triggers on the same email. You may want to go into your trigger's settings and set Concurrency Control to 1 just to be double sure.
Here's how this setup looks when built:
If this comment resolved your issue, please remember to mark it as the answer.