If you're not excluding drivers who subsequently returned to the sport in later years (after "retiring") then the obvious answer would appear to be Kimi Räikkönen - he finished 6th in the 2009 championship only to get the elbow in favor of Alonso. Of course strictly speaking it wasn't that Kimi's contract wasn't renewed, IIRC Ferrari paid both him and Alonso and just had Alonso in the car.
If we're only considering drivers who never returned then Nick Heidfeld comes to mind - he came 11th in the 2011 WDC after a fairly messy parting with Lotus Renault GP (only 11 races in to the season) and he expressed a desire/expectation to return to the sport at the time.
One driver with a higher "last" championship finish then Heidfeld is the man Perez is replacing at Red Bull Racing - Alex Albon, he finished 7th in the 2020 WDC. He's without a race seat for 2021 and it certainly wasn't his Plan A! However we don't know yet whether he will return to the grid in the future or not.