Sorry to confuse you, I meant if you put in a command block the /execute (Playername) ~ ~ ~ tp @s ~.2 ~ ~. It will stay in the same place, which in the Java edition, teleports the player .2 of a block continuously. In the Java Edition, both sets of commands in a command block produce the same output which is to teleport the player .2 of a block, but I was more concerned about the /execute not tping correctly.
I tried that and it ends up teleporting me to a block ex: 15.20 4 -5 when using the execute command.