Water level sensor?

The door sensor probably won’t work for multiple reasons, one being that you should never put a battery operated device into an airtight container, including a plastic bag, unless it is specifically designed for that purpose. Batteries can and do outgas and it becomes a fire hazard. And as you noted if you try to put the sensor on the outside of the tank it can be tricky to get the magnet inside to line up just right.

That said, there are several flood sensors which work via an attached probe and those can probably be used for the kind of use case you describe. For example, people use these to test whether a Christmas tree well has run dry. You mount the radio part of the device up out-of-the-way so it stays clean and dry (if necessary, you can put it inside a vented project box like people use for outdoor electrical outlets) and then run the probe down to the point where you want it to alarm.

See, for example:

Looking for a way to monitor/notify me when a water/wet sensor is dry