How can I make my flyback converter discharge immediately?
this causes some relays to stay energised for a second or two after power supply is cut off which is not ideal. ... what can cause a relay to stay energised after supply is out?

Relay coils have pick up and release voltage ratings. Most relays can pick up at 75% of rated coil voltage and can remain until the coil voltage drops down to even 30%.
The converter's output capacitors are calculated according to the max load of the converter. If the load (your circuit) draws way lower current than this rating then it will take more time for the output capacitors to discharge after power-off.
The quickest solution, as @syntax has suggested in his/her answer, can be placing dummy loads across the output of the converter. This, however, will increase the power dissipation of the system.
One solution I have used in one of my designs is to put a &quot;discharger&quot; which is activated after power off:



simulate this circuit &ndash; Schematic created using CircuitLab
In the above diagram, the dummy load is connected to the output through the NC (normally closed) contacts. Once the circuit (and thus the RLY1) is energized the relay's contacts change position and the dummy load disconnects from the load. Once the power is cut off (and thus the RLY1 is de-energized) the dummy load re-connects to the output and discharges the output capacitors quickly. Of course, there may be excessive heat, but for a short time.