Yes you have to take the APFT.
Imagine: We go to war with North Korea and a stop loss is enacted for everyone, including those with an approved retirement date (this has happened in the past Afghanistan, Iraq,etc). You are required to meet all standards until the date of your retirement and even then, you are subject to recall. There is nothing in the regulations to the best of my knowledge, that allows the Soldier to opt out because they have an approved retirement.
I have seen situations in which 1SGs have excused Soldiers from PT once they completed their retirement physical or exit physical (ETS) to try and prevent any potential injury which would cause them to miss their final out but this is a local decision.