How to prevent taxonomy terms being duplicated on node form?
Though there is a module for help with taxonomy term being duplicate here, but like module page says, it doesn't work apart from taxonomy term and vocabulary forms.

So a solution I can think of in your scenario is to use hook_node_presave and compare value of both fields. If it match, you can think of some logic such as, create single term &amp; set newly created tag for both fields.

Other hook can also help you such as hook_node_insert with your own logic to tackle this. Happy Coding !!