I don't know what causes this, but occasionally I encounter a hostile mob that is completely invisible and has no hitbox. I have even checked for hitboxes and they aren't there. The mob can still hurt you, and still makes noise. I have been able to fix this by leaving the world and coming back, and the mob will be normal. I have encountered this in both singleplayer and multiplayer.
Linked issues
Comments 4
In that case since you mentioned you were using OptiFine, this report is a duplicate of MC-193509 as this problem is caused by the use of this modification. Please see the parent ticket for further details.
Hello! Are you using OptiFine or any other modifications to your game?