The key is to stop the containers and recreate them. Use --force-recreate with docker compose up command it will re-create containers with correct assets from image. Something like:
docker compose -p <container-name> -f docker-compose.yml up -d --force-recreate --build --remove-orphans
Like mentioned by @revant_one
https://discuss.frappe.io/t/bench-build-force-404/139746/9?u=coffeeinc
Running bench build in production seems to mess up the assets and require the containers to be recreated. The FAQs also mention avoiding to run this command as the assets come bundled with the image container.
For added measure, you can also run the following command to update permissions of assets folder access:
docker exec -u 0:0 -i <container-name> chmod -R o+rx /home/frappe