How can I prevent the new indexing bug from creating useless pages on Google?

They’ve added a ‘noindex,nofollow’ X-Robots-Tag which is fine but if you have any of these URLs already indexed, you can request removal from the index in Google Search Console to speed up the process.