From a managerial side, this has reminded me that human nature is to slack when possible and take initiative and keep people productive or move them out on my timetable.
Food for thought from my own experience (including as a now-retired manager): It seems you are seeing intentional and wanton slacking as the only explanation here. Keep in mind that some of this "coasting" is not intentional but just the inevitable progression of life and lack of motivation for that work after a long career (you already touched on/acknowledged this when you said you might see things differently in the future, so kudos to you on that). And that is indeed a legitimate explanation IMO. I would liken it to expecting a 50-year old to run races just as they did in their 20's or early 30's. They aren't intentionally going slower, they just may not have the same drive, motivation, or ability to do that any more. Hey may indeed be giving their best effort -- it's just that their best effort is no longer as good as before.
In my case, I wasn't intentionally slacking -- I just did not have the same drive for the work as I used to, particularly with the finish line so close. I was trying to be motivated and put in "110%" but just wasn't possible for me. Considering I gave them 18 over-achieving years, I think they could "suffer" 6 months of just-adequate work.
I say cut those soon-to-be retired folks a little slack (ha, some pun). Yes, it is not the most efficient arrangement for the employer, but I recommend empathy. Instead of having your eye on them as likely slackers so you can deal with them or fire them, recognize it as the milestone they've achieved and deserve. All of us may hit various times in our work career where a little flexibility or going easy on the employee is appreciated (death in the family, problems at home, child care issues, problems with coworkers, etc.). It would be a shame to go hard on those people adding to their difficulties, and you might appreciate the same consideration in the future for some as-yet-unknown reason.