Are area_effect_clouds not affected by the [y=5,dy=0] selector? [closed]
This is a known bug: https://bugs.mojang.com/browse/MC-88533
You could try dy=1
or even dy=2
and add sort=nearest,limit=1
as a workaround.
Apart from that, you should use @s
as the second selector, if you just want to select the one entity itself, otherwise you run something for all entities as all entities, which quickly gets pretty laggy. If you do that, you don't need sort=nearest,limit=1
anymore.