That is a tough ask!
https://www.discogs.com/composition/8487a36f-7fd8-429c-bca1-f7aab075ceda-Imagination
I went there, and looked at the discography of everyone credited as involved in the song.
None of them show a credited performance on the song.
My guess would be Giorgio Moroder, Michael Sembello, a combination of the two, or an uncredited studio musician.
It appears there is zero crediting to the performance.
I know, right?! It is surprising the guitarist isn't listed anywhere. It's not like Flashdance is obscure, it won a Grammy. And even the song Imagination had radio play and praise, with Laura Branigan being quite popular at the time. Not to mention the roving guitar playing is a significant part of the song.
Richie Zito played guitar on all the Moroder songs. They worked together a lot, Donna Summer, Blondie, Berlin, American Gigolo, Scarface, etc. Sembello played on the Ramone produced tracks.
Excellent, Xuder! Richie Zito played guitar on the 'What a Feeling' track, produced by Moroder, where Zito is credited with guitar solo, but there isn't one, unless that synth sounding solo was played with a guitar with pitch-to-midi?
Imagination was produced by Phil Ramone, who also produced Maniac, where Sembello played solo. So probably was Sembello.
Now that we know this, it's really not that hard. Just have to match the guitar sound to the song. To my ears, the lead guitar tone and effect in Imagination sounds like Maniac.