He got sued and lost big. Even Lennon acknowledged it was a conscious rip off.
“...conscious ...”
I can’t imagine anyone - except someone really unscrupulous, and Harrison did NOT strike me that way - intentionally doing that when it’s so easy to prove.
As a musician myself, I’ve written songs and later scrapped the music because it sounded too much like something else.