Ansible merges group_vars when deploying to same host in different groups
As a workaround, you can choose a different name for each group and set the var ansible_host for each with true hostname/IP. Example:
[group1]
example1-group1 ansible_host=192.168.0.10
[group2]
example1-group2 ansible_host=192.168.0.10
In this case, Ansible considers that you have two different hosts, with dedicated hostvars and groupvars but reaches them the same way.