I've been in this situation when +1 came down with pneumonia in Peru in 2018. After 6 nights in hospital, the decision was made to abandon the rest of hte trip and return home. Our travel insurance company arranged flights on a "like for like" basis and as we were on a OWA in J, then the flights back to Aus were to be in J. Unfortunately, most LIM-SCL flights on LA are all-Y birds while those with J seats didn't have acceptable connection times so we were in Y for that leg. However, the rest of the trip was in J and were given restaurant vouchers at LIM (no lounge there).
The travel insurance company arragned for our points to be reinstated on a pro-rata basis and we received points and status credits for the flights as they were revenue fares. The insurance company was excellent and although the paper work on return was a bit tedious, I could not fault them and it all worked out well in the end.
Of course the terms and conditions of your policy are critical and you need to read them carefully and seek clarification, if necessary. The time to check the details is BEFORE you take out the policy, not when you are in a hospital bed on the other side of the world.
You can read more about our experience here:
Canyons, Mountains & Vineyards