@clevername27 i actually dont have any code in the note off, but the sine wave generator having the same issue doesnt have any code at all.
if you use fl studio i recommend trying it. export a vst with only a sine wave generator and no code, then in the piano roll add a few c5 and f5 notes. let it play for 2-3 minutes and you will hear notes will stick. that cant be related to the project or hardware