I attach a behavior pack that fixes this bug and the MCPE-94878 bug completely like this:
[media]I'm using Minecraft Bedrock version 1.19.50. On Hard difficulty, if I don't use this behavior pack, spider won't spawn with any buffs or status effects. And spider will also deal 4 HP damage to player on Hard difficulty without this behavior pack. But with this behavior pack, spider will only deal 3 HP damage to player on Hard difficulty. On Easy and Normal difficulties, spider still deals 2 HP damage to player.
This bug still occurs on 1.19.51