We lost the ability to print $50 bills with our HPs[2] and it had no noticeable negative impact on society. I'm not sure why losing the ability to print a gun with our Prusas will be any different.
[1] - https://www.scienceabc.com/eyeopeners/cant-photocopy-scan-cu...
[2] - https://h30434.www3.hp.com/t5/Printers-Archive-Read-Only/Won...
It's not technically possible to detect "gun geometry".
The only way to comply with this law is to ban 3d printers entirely.