Obviously this only works on domestic flights but the airline will not lose your luggage if they know they are dealing with a legally declared gun. If they do, they get sued by the ATF. Your luggage will be given first priority if you just throw a shitty cheap gun from Walmart in there.
If you’re not interested in bringing a full on gun, you can get a busted old AR receiver with none of the other parts needed to actually fire a bullet attached to it, and it’s enough to legally count as a gun for travel purposes
Technically speaking, the AR-15's lower receiver is what's classified as the firearm. You can get an Anderson Manufacturing stripped AR-15 lower for under $100.