So I did some research, and it turns out that the way
[x=X,y=Y,z=Z] works without a
distance selector is different than what it used to be:
Selects targets based on distance to that exact position. Combine with
selecting by radius to select only targets at that specific position.
distance is being automatically filled with the distance from the executing position (in this case, the command block) to the coordinates supplied.
When you use the selector form of
distance=3, you're saying you want players that are exactly 3 metres away from the coordinates specified, and given that coordinates are floating point values, that's basically impossible without teleporting them to a specific position. Instead, you want to use a range, such as
distance=2..3 (2 to 3 metres away),
distance=..3 (less than/equal to 3 metres away), or
distance=3.. (greater than/equal to 3 metres away).