The USA is not developing rail guns but Japan has with some success. Laser weapons are proven and very efficient near distance weapons. Just because we chose to do something that is hard, doesn’t mean we shouldn’t do it.
Look what it took to get the JWST into space, and just look what is is accomplishing!
Our defense contractors do try and keep up, but it’s very hard, and giving our enemies access is one of the biggest problems we have right now that is preventable.