I asked the same question a little time ago of familiars... particularly of the warlock chain pact...
It doesnt say they do... but also doesn't say they don't... it also doesn't say anything about them un-summoning after a long rest that i cound find either... and does say the summoner can send them to/bring them back from a safe "pocket plane" with an action... seems they are supposed to be permanent unless they are killed or un-summoned...
I kinda lean that they arent intended to level but think, in particular with the warlock chain pact, they should... while they follow our directions, they think independently and are supposed to be controlled more by the DM... could simply treat it as a quasi NPC, one you can have a good/bad relationship with...
Seems theres an opportunity here at the least... but one they won't take imo, leaving pact of the chain the red headed stepchild of the warlock pacts... especially with being able to get a familiar (albeit a standard one) with pact of the tome and book of shadows pact boon... can still hope though...
Ranger beast master being one of the few subclasses haven't tried yet i was wondering how their animal companion would be treated, permanent/becoming more powerful or a cheese summon monster 1 spell/one shot meat sheild after a few levels... doesn't bode well...