Additionally there is usually a provision explicitly allowing for this in the contract with the initial voice actor. Depending on the voice actor’s leverage, they can negotiate for things like approval over the replacement, right of first refusal to voice the character or payment when a sound-a-like is used.
The fact the character sounds exactly like Owen Wilson himself is somewhat incidental though understandably makes this confusing. What they couldn’t do in this case is have an Owen Wilson soundalike voice a DIFFERENT Disney character. They only own Owen Wilson’s voice as it pertains to portraying the character Lightning McQueen.
In the OpenAI situation and Frito Lay there is no initial contract granting any rights to a voice performance.