If you break a law today and get away with it for 5 years. If the law that you broke would be repealed 5 years later could you still be prosecuted for breaking the law while it was in effect or does repealing a law include removing all possible prosecutions of possible law-breaking even if the breaking of the law happened while it was still in effect?
In general, yes.
1 USC 109 states that:
The repeal of any statute shall not have the effect to release or extinguish any penalty, forfeiture, or liability incurred under such statute, unless the repealing Act shall so expressly provide, and such statute shall be treated as still remaining in force for the purpose of sustaining any proper action or prosecution for the enforcement of such penalty, forfeiture, or liability.
Translated into plain English, this means that if you were to smoke marijuana in a Yellowstone National Park campground today, and Congress were to pass an act saying "28 USC 841 is repealed" tomorrow, you could still be arrested and convicted for possession of a controlled substance next week. However, if the act instead stated "28 USC 841 is repealed and no retroactive prosecutions shall take place", then you can't be convicted.
(The other half of 1 USC 109 is basically the same thing, applied to temporary laws: if a temporary law expires, you can still be prosecuted for actions taken while the law was in effect, unless the law states otherwise.)