If your main domain is using Cloudflare and dev.example.com sub-domains are proxied , you could add them behind an Access policy to your Cloudflare Zero Trust team, therefrom define a Policy so only you and developers can access them.
You cannot prevent them being added and shown in the “DNS history” of the public services, which do expose your DNS records for your and other domain(s) as well, or scan on regularly daily basis.
Adding below HTML meta tag could help, since most bots don’t follow not respect the robots.txt nowadays.
Best method for this is restrict access with Zero Trust Access and sending a x-robots HTTP header as well via Cloudflare Response Header Transform Rules from my experience.