The only way Matip is getting another contract is a short-term one as a courtesy to help him rebuild his fitness.
It would be genuinely insane to count on him in any meaningful way for Liverpool moving forward. He's a great player but unfortunately he's never, ever bloody fit. He's averaged about 25 appearances a season in his entire time with us, and a couple of decent seasons (availability wise) when he first got here aside, the past 5 years makes for horrible reading - 13, 12, 43, 21 and 14 appearances. You can say keep him around as a high-level squad player, but you can't choose when a player is injured and the chances are he picks up his injuries right when you actually need him to step in (as has often been the case in his time here). It's a squad place and wages that should be going to a player who's actually going to be fit enough to meaningfully contribute (or failing that, a younger player).
He's also on his way back from an ACL, which is a bad enough injury for any player at his age, but for a player who was already as injury prone as he was, I wouldn't be surprised if he never plays meaningful top-level football again. It's got that horrible cycle of [get fit, put in 2-3 good performances, get re-injured] written all over it, sadly. I'm sure we'll do right by him in terms of helping him in whatever his next step is, but his time as a Liverpool player is surely done.