Sounds like the indexing is just out a little bit (or the cable a bit too slack). Do you swap wheels on that bike? Or swap between wheel and direct-drive trainer? Does it happen on both cassettes, if you do?
Think I’d just try and give the barrel adjuster a small (quarter, or half) turn anti-clockwise.