1👍
I decided to create this question with self answer because I spend a very long and frustrating afternoon solving this issue since I didn’t find the right solution anywhere on the web.
What I did wrong in my deployment was setting my buildpacks the wrong way when I set up the project for heroku. Don’t be me and immediately go to StackOverflow and find the solution there.
To serve the staticfiles correctly obviously python and collectstatic has to run after npm build from react. Thus add python buildpack after nodejs in Heroku:
heroku buildpacks:add --index 1 heroku/nodejs
heroku buildpacks:add --index 2 heroku/python
👤Phil
Source:stackexchange.com