Every browser has to act together, or the ones that don't will win due to better compatibility.
The obvious way to make that happen is a law. Just prohibit the user agent string from being sent, starting with browsers that are distributed after a certain date.
Perhaps a bit of voluntary cooperation is possible. It worked for webassembly.