Things that don’t fit through the hole shouldn’t be rigid bodies.
If the hole gets bigger as you progress, you should turn new things into rigid bodies with each hole enlargement.
With the other approach, you don’t really need to change any node types as such. Just unparent the rigid body parts from the object scene (but keep a reference to them). The object will then only serve as a visual representation, i.e. it will only have a mesh node. When the time comes, reparent the rigid body back in.
Remember that at runtime, the whole scene tree is just one big tree of nodes. You can at any time rearrange it any way you see fit.
Get rigid body’s parent. Reparent the mesh node to this parent, unparent the rigid body node and store its reference in mesh node’s metadata (or in some dedicated dictionary)
To reverse it, get mesh’s parent, get rigid body reference from mesh’s metadata, parent the rigid body to mesh’s parent and reparent the mesh to rigid body.
Note though that in your case for now, just freezing the body would likely be enough. Juggling nodes in this way would only make sense if you want to minimize the number of computationally heavy nodes (like rigid bodies) or nodes in general, as an optimization strategy.