Hi @atfech
It’d be really helpful if you consolidate all your comments into one, the best possible, instead of multiple single comments.. ?? It’d make it a lot easier for the volunteers to read, digest and help as needed.
First, in addition to the documents provided @anevins, we’ve prepared a pretty comprehensive guide that should assist you locate what might be happening: https://sucuri.net/guides/how-to-clean-hacked-wordpress
So as to your questions:
1 – Is there a way to prevent this hack? Ofcourse there are, but it’s difficult to know where to start with understanding what exists and what you’ve done. That hardening guide you provided is definitely a good place to start.
2 – As for the vulnerabilities in WordPress, read that article WordPress – Understanding it’s True Vulnerability. Wrote it a few year ago, but still very applicable today.
3 – To help prevent Brute Force attacks, you might want to consider a 2FA plugin that enables some form of multi factor authentication when someone is trying to log in.
Best of luck