A possible fix may be moving your bed away from the walls, but I can't confirm this since the world I had experienced a glitch where the second players screen gets stuck on "Generating Terrain".
This glitch still continues.
Here is a short clip showing how the character looks in-game and what happens if you try attacking them.
A possible fix may be moving your bed away from the walls, but I can't confirm this since the world I had experienced a glitch where the second players screen gets stuck on "Generating Terrain".