How to escape from "CFUN = 5" on RM520NGL module

It *should work in theory. Should have CFUN 1 if successful.

Other possibilities:

CFUN 7 (incomplete/incompatible EFS) which is pretty much the same behavior as CFUN 5.

Unlikely but still a possibility:
Sahara dump mode:
This would mean it really really doesn’t like the state of the EFS (worse than cfun7) and will try to dump logs to the DM/Diagnosis port as soon as it’s opened by QPST then reboot.
In that case you’d need to do another erase all flash (or at least wipe the efs2 to get back to CFUN 5)