List of tests carried out to try to eliminate the problem:
1- I reinstalled SSL let's encrypt on all sites.
2- Changed the rewrite url to the wordpress default in the aapanel.
3- I restarted PHP.
4- Restarted Open LiteSpeed.
5- Restarted aapanel.
6- Deleted aapanel and installed everything again, on all sites.
7- I checked cloudflare to see if there is any 301 redirect applied, but there isn't. I even tested domains that aren't in cloudflare and the redirect continues.
8- I cleared the cache.
9- I've opened the sites in different browsers.
10- I've already deleted the sites and installed them again, it worked for a while and then the last sites installed started redirecting to the first site installed in the aapanel.
11- I haven't applied any redirects on purpose.
12- I've confirmed that there are no redirects applied to my sites.
And the problem still persists.
Is there anything else I can do?