The idea would be to build a wood base for it, so you could put that on the carpet and the safe on the base. It’s just to lift the safe up enough to make room for the sensor underneath.
Btw, in some configurations it’s also possible to just glue a presence transmitter to the inside of the safe (remembering always the ability to change batteries) so that even though nothing gets through when the door is closed, as soon as the door is open, you know. You turn off the alert notification before you yourself open the door, then on again when you’re finished. This is super simple precisely because the safe blocks transmission while it’s closed.
This won’t tell you anything if someone steals the whole safe, or while they’re tampering with it, but does fit some use cases, particularly unauthorized access from someone who knows the combination.
The closet door is a good workaround as well.