Make sure humidity and temp are perfect especially when it's molting. If it already was then it's just bad luck.

When a tarantula molts it isn't actually stuck inside the old exoskeleton all cramped up. It comes out soft then as it's new exoskeleton is hardening it expands so it grows bigger.