A few things about this. The base of the antenna may be connected to the negative of the power-supply of the WiFi extender. If that is the case, isolate it from the mast.
Second putting your WiFi extender in the top of the mast may seem a good idea but most of the time it’s not. Most WiFi antennas radiate in the horizontal plane as this is where the WiFi clients typically are. So the top of the mast is likely to be above the plane of best field-strength.
There are simple POE injectors for sale on Amazon. They run on several different input voltages and the proper ones are isolated (between input and output). If I remember correctly POE is always 48 volt.
So putting a proper POE inbetween and lowering the antenna may just be the ticket for you.