Technically yes, but there’s one simple problem which results in a lot of hassle with a job like that: you have to be able to remove the sensor again to replace its battery.
The way that the sensor installs and uninstalls from the surface it is mounted to is a sliding action on its base, if the sensor is in a socket that is exactly sized for it then this will not work any more at all, so you will have to find your own mounting solution.
Second is the tamper switch. Your mounting solution will need to either encompass the sensor in addition to its mounting plate (in which case the tamper switch no longer serves a purpose) or else you will need to install a pin of some kind in your mounting solution that presses on the tamper switch until the sensor is removed from its socket.
My recommendation for mounting is as follows: find two drill bits with a diameter roughly equal to the width of the sensor and drill two holes in your frame roughly as far apart as the sensor’s length to a depth of the sensor’s depth. Drill more holes and or carve out with a chisel and knife between the two until you have a socket that is just sized for a snug fit of the sensor. Remove the adhesive backing from the sensor and place a nylon ribbon behind the sensor so that it pokes out on the top and the bottom, that way you have something to grab onto to get the sensor out again.
Remove the sensor from its housing altogether so you just have the bare circuit board, carve out an appropriately-sized slot into your door fame for it. Solder two leads to the battery terminals and run a wire behind the door frame inside the wall to a 6V DC - DC buck converter. Multiple sensors can be wired to the same converter, but probably not the whole house. Take the high-voltage side of all of your buck converters and wire them to a sealed lead acid battery in a closet somewhere that’s kept charged by a simple battery tender. When you’re done with that you no longer need to replace the batteries on the sensors ever again, so spackle over their slots, and carve each sensor’s pairing number in the spackle.