No, you cannot retroactively make something a crime as you have found.
That way lies madness.
If the govt could do that, they could arrest anyone, anytime simply by making whatever they did yesterday retroactively illegal.