I agree with you in some circumstances but in this case it is a very basic no-no. You are a US Marshall on an American registered aircraft and your job is to be incognito in case someone wants to hijack this aircraft and your main tool for work is your gun.
How can you forget your main tool for work, a deadly one at that in the lavatory?
If the story is true and the gun was returned to her while in flight, she is no longer incognito and since this is now a public story I'm afraid she will be fired and perhaps rightly so.