If you are using EE 3-6 (possibly lower as well) "themes" is a protected name in the EE Installation at the web root of your install. So mydomain.com/themes is seeing that directory before your template directory and throwing the 403 error. Either choose a different name for your template group or do as JCOGS suggested.
Hard to tell from your question what actually is going on, but here is a suggestion for a way forward:
Download a clean copy of EE 5.4
Create a clean / new install of EE 5.4 on some test system
Copy the system / index files created in the new install
Update the copied system / index files with relevant information from your existing system / index files