Replace relay with mosfet

An inadequate power supply on the coil will cause it to rapidly drop out as the voltage sags and then re-energize when the voltage comes back up. What are you using for the coil voltage supply?