Get world player is in

I'm trying to execute things depending on what dimension the player is, I'm trying this:

execute as @a at @s in minecraft:overworld if entity @s[distance=..0]

but the problem is: it is returning true on the end

do y'all know why?

PS: doing execute as @a at @s in minecraft:overworld if entity @s[x=0] seems to return true on every dimension (didn't test a lot)

Continue to help post