There are probably several ways that a didactic passage could be appended to a story to reinforce a theme in the story and present resources for handling an issue without excessively offending the reader. The following three came to mind.
For a shortish story, the story could be framed with a parent telling the story to a child leaving the nest. After the conclusion of the internal story, the parent could then provide instruction about avoiding the mistakes the parent (or a friend) made and how the parent/friend recovered. This avoids directly addressing the reader — avoiding defensiveness — and draws in the reader some allowance for a parent's protectiveness. A close friend might also have the emotional investment and relational trust to be able (from the reader's perspective) to preach from experience
If the reader forgets the framing, a longer story might be acceptable, but length would lead to fridge logic — "Wait, the parent was telling this story for ten hours without a break?!" — which could easily break the belief that the didactic portion is that parent extending the lesson. Breaking the internal story into sub-stories could avoid this difficulty, using multiple framing texts to link the story fragments. For example, a new roommate might first tell of a former roommate (who either, later in the inner story, has the issue or was affected by the narrator's issue) and how they became friends and roommates, then have an external fragment set a few weeks later perhaps after a shared social engagement (meal, entertainment, shared volunteering, or whatever) that reminds the narrator of the previous friend and introduces another story section, then perhaps an outer fragment where the narrator's roommate is hinted at being exposed to the issue and the narrator gives some information about the start of the issue (which can be an effort to say "I have some experience with this, if you want to talk about it" without being intrusive), another external story fragment might then present more hints of the issue (which the narrator might be misinterpreting) with more details of the narrator's previous experience presented in the inner story. Eventually, the narrator could reveal the deep impact of the issue in another inner story and conclude with the didactic portion.
Another method, which does not use a character's voice, would be to present an "About the Author" section explaining the motivation behind writing the story followed by advice about recognizing the issue and dealing with it. A well-written story will communicate that the author cares and the "about" section could communicate that the caring is not merely abstract but personal; the reader could choose not to read the didactic portion (it is not forced on the reader as part of the story) but would be encouraged by the author's emotional investment and by curiosity.
A third method would be to have the character write, e.g., a blog post about the issue and share it with another character asking for advice. The character can then deal with some of the reader's objects by explaining to the blog post's test reader that the character does not want to turn people off by seeming preachy but really wants to help others avoid the consequences of the issues known all too well from personal experience.
Most readers would not appreciate being tricked into being preached at. However, if the preaching does not directly address the reader (as in the first and third methods) and if the motivation for preaching is understandable and preaching seems to flow naturally from the preceding content, the reader may more readily accept it.
All three of the described methods have limitations. The first tends to exclude more abstract arguments about the issue since it is a friendly sharing and not an essay. The reader is more likely to skip the didactic portion with the second method, though a compelling story will tend to draw interest in the author as a person and the author's personal experience is likely to draw interest in the 'essay'. The third method seems a middle ground; the blog post format allows abstract argument but there is more risk of the reader feeling tricked. Having the test reader provide some valid negative criticism might moderate the sense that the (actual) reader is being preached to unwillingly.