There is something wrong with how pets/summons work and it has pretty much always been like that. Old SMN had the same issue and they changed it that the spells were cast from the player but for some reason the rework returned to the actual summon casting those spells so its heavily affected by its positioning and the targets positioning