Pretty positive the ban in Premier League comes from next season 26/27.
Kinda paradoxical when you think about it...they can still be sleeve sponsors, betting partners, or whatever other main sponsor with sideline signage and in-stadium advertising boards, just not front-of-shirt sponsors. It's like trying to deal with a problem, but not really. It's stupid.
It would be funny if one of those gambling companies had their EFL-sponsored team win a promotion next season, i'd imagine their front of the shirt contract would be automatically terminated due to the ban in the Premier League.
I think the sponsorship contract includes this clause, something like "if, under pressure from external circumstances, it is impossible to fulfill contractual obligations, then the contract is considered voluntarily (without penalties) terminated."
By the way, I would like to know if some gambling company buys a club and renames it (in honor of itself), how will this be resolved?

There is such an example in the Russian championship, but gambling companies are not being persecuted there yet, so there are no problems.