I don't think Kendrick erased him. Cole kinda erased himself and it started long before he took that diss back. The impression I've got of Cole is that he came into the game as a fan who rapped, and many of his aspirations were based on childhood dreams of becoming what he loved. He wanted to drop a classic debut album, have hit records while maintaining a street/non-mainstream following, be the golden child, etc. Basically a mixture of Nas/Jay/Pac who never went too far pop, never fell off, got the 5 Mics treatment at some point and avoided the pitfalls they faced.
The problem is that instead his first album was pretty weak, in part due to Jay demanding pop records. So he didn't get the classic debut. Then a year later his good friend dropped a debut album that was immediately hailed as a classic. Then his good friend started winning awards. Then Nas and Jay started praising his good friend while simutaneously being harder on him (being stuck between Jay demanding hits and Nas denigrating his single). Then his good friend asserted dominance with a verse that shook up the game and name dropped him. In short, Kendrick was suddenly doing a lot of the historical shyt that Cole once dreamed of doing as a kid.
Then what happened? Suddenly Cole started talking about no longer chasing accolades, no longer caring about reviews, no longer worrying about fame. I thought it was obvious at time but in hindsight it's even more undeniable: his shift to care free, longer hair, bike riding "fukk fame" Jermaine was 100% a response to him realizing Kendrick got the shyt he initially wanted in the game and the jealousy wasn't healthy. He had to re-prioritize and focus on shyt that made him happy. And him doubling down on rappity rap exercises over the last few years was him trying to get back to the essence and differentiate himself from Kendrick and Drake, both of whom become more commercial in subsequent years. I think the Like That verse was simply too disrespectful for him to ignore but shortly after dropping that diss he reverted back to his peaceful state and took it back. I don't know where Cole goes from here but he seems to be at peace with himself.