Uninstall and reinstall the drivers using the latest off of AMD's support site. Might also want to list the VBIOS you used to flash to an RX580. Also state the make and model of your PSU and it's age.
Was the GPU working fine after flashing the BIOS ? What does it currently say under the DEVICE MANAGER, "Display Adapters" setting entry ? Use the DDU tool, to completely do a CLEAN re-install of the GPU drivers. Do this in SAFE MODE for best results.
Looks like some OS issue to me though. https://www.guru3d.com/files-details/display-driver-uninstaller-download.html