Skeletons interrupt the loading of their bows when their CustomName is changed using the /data command.
I noticed this behavior after programming a datapack where a mob's current health is displayed as hearts in the CustomName. To make this possible, the CustomName is set every tick. As a result, skeletons will follow a player but won't attack them with their bows.
I also reproduced this with a simple setup (see the YouTube video or the Video attached). I used the command execute as @e[type=minecraft:skeleton] run data merge entity @s {CustomNameVisible:1b,CustomName:"indic-1"} (with indic-2) to repeatedly switch the CustomName of skeletons back and forth. It can be observed that the skeletons interrupt the loading of their bows every time the CustomName is changed. I then activated a repeating command block that permanently (every tick) changes the skeletons' custom names using the command execute as @e[type=minecraft:skeleton] run data modify entity @s CustomName set from entity @s Health. This results in the same behavior I observed with the data pack.
This behavior affects not only skeletons, but also Strays and Parched.
YouTube Link: https://youtu.be/3qp_bWV6R6I or Video attached.
Environment
Java Edition
Minecraft Launcher
Version: 1.21.11
Here is an excerpt from my datapack code, which adjusts the CustomName every tick, based on their health.