Good question, IMO. But if you owned it before the ban went into effect, then it might be allowed to be returned to you.
It might also depend on the LE agency or agencies involved- my impression has been that some of them don’t like having firearms in the possession of the general public. You might need to lawyer up to get it returned, so it might not be worth the money.
I’m just thinking of a few possible issues, off the top of my head. Disclaimer: I’m not a lawyer.
ETA: And there is the possibility that it could be retained as “evidence”, indefinitely.