After extensive discussion with @dapperdandev, it was noticed the issue seemed to do not with the deployment but with the routing for Angular apps and Github pages.
As per this blog post https://benfraserdesign.medium.com/deploying-an-angular-app-on-github-pages-c4dfee672968, copying the index.html file and naming it 404.html into the docs folder seems to work as a workaround for the issue.
So I updated my build command from:
"build": "ng build --configuration=production --output-path docs --base-href /bible-quiz/ && mv docs/browser/* docs/ && rmdir docs/browser",
to:
"build": "ng build --configuration=production --output-path docs --base-href /bible-quiz/ && mv docs/browser/* docs/ && rmdir docs/browser && cp docs/index.html docs/404.html",
And that fixed the issue.
PS: Other than this, I tried to use hash routing as per:
https://stackoverflow.com/a/75993642/6654475
But that didn't seem to fix it for my case, but maybe would be a better path for a solution if having a 404.html file as a duplicate of the index.html file may not suit your case.