A. Try to reposition your character slightly when attacking to see if that resolves the collision detection. Sometimes, a small adjustment can make a difference.
B. Use ranged weapons when possible to avoid close-quarters collision issues, especially in tight spaces.