This has been discussed quite a bit - search for a while and you'll find a couple of threads / conversations on it.
In theory: It doesn't transfer. all the language, in the app, on the website, etc, says it doesn't transfer. "For original owners only. Non-transferable". There's nothing you or the dealer you're working with can do to "get the EA transfered".
In practice: Lots of cases on here of people buying used and finding the free EA works just fine. It worked for me with my previous GT, which I bought used. I've yet to read about a case of the free EA being removed from a used car. But at some point Lucid or EA could take it away, and they'd be well within their rights to do so.