Loads of patents on exactly this sort of stuff, including with the DoD, Moderna, etc.
I have no problems with patent protections, but I know of no law prohibiting independent research, or even reverse engineering something.