For anyone who might come across this issue; I managed to find out what was causing it. It turns out it was a TypeScript compilation error that kept the admin pages from building. However, the actual build script didn’t fail and the error also didn’t occur when building locally. We didn’t notice the error until going through the github build logs.
The error was reported in in various flies inside admin/src/pages and looked like this:
"TS2307: Cannot find module '@strapi/helper-plugin' or its corresponding type declarations."
Even though the @strapi/helpler-plugin was declared inside custom.d.ts it didn’t seem to actually do anything. I simply added skipped the typescript checking for the affected files by placing // @ts-nocheck at the top of each file.