Sometimes the build works even if i change nothing, maybe the build cache is shared between pages and worker builds? and it gets the version from there when the pages build completes with the same package version? But is is also not reliable so i'm not quite sure what the problem is.
Once the build works one time with a version it continues to work with that version, most likely due to the build cache?