There are many time-savers in draw.io: For example, you can drag a shape over a container, and you’ll see the container outline highlighted in blue. When you drop the shape you have dragged, the container will automatically resize to include the shape you dropped onto it.
But sometimes, you simply want to overlay shapes!
Overlay shapes and containers in draw.io
Select and drag your shape to the position you want it to be.
While you are still ‘holding’ the shape, press Alt on the keyboard in Windows, or Option on the keyboard in MacOS and let the mouse button go (drop the shape).
Now, your shape will not be added to the container, but be overlaid (or underlaid, depending on the order you added the shapes to your diagram).
Alt+Drop (mouse release) now ignores the highlighted drop target.