Article 1, Section 9 is a section limiting the powers of Congress, not the states. It actually does not read as you say it does. It reads, more precisely, “No bill of attainder or ex post facto Law shall be passed.” Now, if you feel this applies to the states, that’s something different. But the Constitution most certainly does not contain the explicit directive you suggest.
Just sayin’.
Article 1, Section 10:
"NO STATE Shall... pass ANY... ex post facto Law"