Tools like Wordfence may block "suspicious" custom code.
Look for rogue code:
If your WordPress website has been compromised by "Prank Ojol," follow these steps to fix and secure your website: prank ojol wordpress fix
They logged into the hosting dashboard. Rafi’s earlier tinkering turned into a concentrated effort: locating backups, checking media folders, restoring the most recent .zip backup the hosting provider had kept. The restore took time. The warung hummed, motorbikes passed, vendors called. Arin told stories about night shifts, tough fares, and the first phone he’d bought to accept orders. Rafi listened, fingers trained now to work with code and menus rather than mischief. Tools like Wordfence may block "suspicious" custom code
If you need to get the site back online immediately while you perform the manual steps above, create a mu-plugin (Must-Use plugin). The restore took time