What I expected to happen was...:
That i could kill an allay holding a mace unenchanted
What actually happened was...:
the mace made the allay invincible when he was holding it
Steps to Reproduce:
1. summon an allay
2. take a mace
3. put it into the allays hands
4. try to kill it
I wonder what's the difference between this and MC-249718? The allay cannot be hit because you gave it an item, thus becoming its "liked player". If you summon such an allay with command, you can still hit it normally.
The command I used is: