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.
Probably not much of a distinction for you, but it may help to keep in mind that TSA are not sworn officers, they have as much legal authority as mall cops (ofc there's a CBP officer just down the hall if needed)