Burning skeletons will attempt to put themselves out in waterlogged blocks, causing them to sort of run in circles in a particular spot.
i would also like to add if this bug is a duplicate, im sorry for wasting your time.
Linked issues
Attachments
Comments 1

They might actually be running to the water itself (not to the waterlogged wooden slabs), but get stuck on them due to MC-127149.