They're not allowed to do that. The tool design has to be freely available for any manufacturer to fabricate free of charge, they're not allowed to try and use this as a profit making exercise.
I don't know why it is that every single time the EU comes up with a law there's always people in the comments that say it's a bad law and that they haven't thought it out, when they've not read the documentation. All of the little tricks that the companies might come up with to turn this to their advantage have already being thought of and protected against. This is exactly what happened with the mandating the USB-C port.