Congress can't pass an ex post facto law. If they did, it could be overturned on that basis
Technicaly congress cannot outlaw firearms either without amending the constitution, but they have in the past.
That is a whole different issue though.
You obviously do not understand how Ex Post Facto works.
Ex post facto would be punishing someone for having done something prior to it being illegal. If however something becomes illegal, from that point on it can then be punished, people that did the outlawed activity prior to that date could not be retroactively punished.
That does not apply to grandfathering, that is not required by law. There is no legal requirement other than the 2nd and the other restrictions on congress which are supposed to keep them from legislating about arms at all.
If possession of something is outlawed it can then be punished from that day forward.
Take illegal drugs for example. It does not matter if someone aquired them prior to them becoming illegal. Most illegal drugs were at some point sold over the counter.
On the day they became illegal under the law simply possessing them even if purchased when they were legal it is an illegal action that can be penalized.
Having purchased them could not be penalized if that action was legal at the time, continuing to possess them could be.
If someone commits a crime or action the community is angry about, but the punishment for that crime is relatively minor or it is not even illegal, then a new punishment cannot be retroactively applied to them at a later date when harsher penalties are added or it is made a criminal offense.
That is what no Ex Post Facto means. You cannot change the punishment for something after it was already done and apply it.