I had a similar issue that was solved by adding the precompile & clean as you’ve mentioned, but I also had to use an entire script to set a few other settings. For my build command I have ./bin/render-build-worker.sh and then in that file I have:
# exit on error
set -o errexit
bundle config set without development test
bundle config set force_ruby_platform true # https://stackoverflow.com/a/66311533
bundle install
bundle exec rake assets:precompile
bundle exec rake assets:clean
I don’t think the extra config settings should help unless you’re running into an error, but I guess you never know.