This is true for whimsicott as well as its preevolution, cottonee, but the majority of a whimsicott’s mass is actually just cotton. Its actual body is incredibly thin, to the point where unless it’s eaten recently, it can fit itself under door cracks. That having been said, it’s very likely yours is doing the same: sliding herself through the crack beneath your door or even around your door’s edges. This is why many experienced whimsicott trainers reinforce their doors by fitting door seals (available at most hardware stores) beneath their doors and rubber sealing around the edges. It’s also quite handy for treating drafts, for that matter!
Or, alternatively, you could try training your whimsicott to sleep elsewhere (by using the typical strategy of feeding her a treat whenever she does something you want her to do—such as, for example, giving her a favored berry for breakfast), but sealing your door is an effective strategy too.