Well, it couldn't have been washed since he comments on the smell of her perfume still being on it. How could that happen? Well, really because the writer said so... It all requires some suspension of disbelief to work, but all stories have that on some level. Most stories depend on to some extent to be successful.
The better question is why did Stephanie leave the note in the shirt rather than on the table or his night stand where he couldn't miss it? Unfortunately, the answer is the same. The problem? For me anyway, I'm willing to suspend my disbelief about the shirt not having been washed for two years, but I'm having difficulty suspending my disbelief about her choice to leave the note there in the first place.
There's actually another way it could be done that would require a good deal less suspension of disbelief. If you look at Steph's chat on the phone, displayed there is "Unable to retrieve older messages"
Most tech companies can't afford to keep everything in "hot" storage (i.e., instantly available). Older data is put into "cold" storage (high-capacity tape drives). Retrieving the data is possible, but can take a while to access. If you've ever pulled an older online backup, that's why you have to wait for an email with a link.
In this case the reveal could be a text or a picture of the handwritten note (actually more realistic due to the space required.)
The script fix would be to have the message displayed start with "Retrieving older messages from backup" once you reconnect with Steph. The easy but less believable fix would be for the restore to happen at the right dramatic moment. The better fix would have the character search for something seemingly unrelated but that is also mentioned in the note. Then the search results show an unread message from a year ago.
Note that I said a year ago - enough time for the MC to have deleted Steph from the contacts. The timing change also muddies Steph a little - her writing the message after the fact softens the abrupt "devil to angel" change which feels a little too "plot devicey". It adds a little more gray area and uncertainty around Steph, but it also sidesteps the questions around "why didn't she put the note in a more obvious place?"