Pixhawk 4 octocopter Dshot relay configuration

I have a problem with the relay configuration on my octox drone.
The entire AUX port is occupied by ESC DSHOT, can I use the MAIN pins to control the relay?
In User Params RC11_OPTION I assigned to RELAY On / Off
First Relay Pin I assigned to MainOut1, but the voltage value on the pin does not change.
Is it possible to use other pins besides AUX for the relay?

Don’t think so. From the GPIO Wiki:
The exception is autopilots using an IOMCU co-processor. These autopilots normally have 8 MAIN outputs, and several AUX outputs. Only the AUX outputs can be re-purposed as GPIOs,

PWM switch?

If you had a flight controller with outputs like this (from the Hwdef file) you would be in business:
Aux outputs