Interesting. Without knowing more details about your installed plugins or WordPress setup, it sounds like you have malware installed on your website.
That symptom, where security software is automatically deleted is a great indicator of having malware.
Malware tries to hide and the best way to do so is to make all security plugins unusable.
Try to install other security plugins that comes with malware detection to find out if there is something installed on your site that does not belong to it. If more security plugins are uninstalled automatically you can be damn sure that you have something bad on your website installed.
A general advice: Make sure that you install WordPress plugins only from wordpress.org or from well-reputated premium businesses. Don’t install plugins from websites that offer premium paid plugins for “free”, so-called “nulled plugins”.
The website was infected with malware which was removed using Wordfence plugin. So I don’t have any doubt about website being affected. The website is pretty simple and has all reputed plugins installed. Help me about how should I proceed further to make wordfence stay.
I would follow all the instructions on this page: https://wordpress.org/support/article/hardening-wordpress/
Also, I recommend:
– Delete the folders wp-admin and wp-includes completely
– Download a fresh copy of your WordPress core files https://wordpress.org/download/
– Extract the WordPress download package and upload only the folders wp-admin and wp-includes to your website.
This makes sure that the WP core system does not have any malicious code in it.
I would do the same with all plugins and reinstall all of them from scratch.
That does not guarantee that there is malicious code still on the system but if you are lucky it will solve your issue.
In the end, the best thing you can do is to hire a professional to get a look at your website. There are many other possible loopholes that could be used by someone else to control your website. You will not catch all of them even by following all the advices I gave to you.
Thanks a ton for your advice @wpstagingbackup.