Are you a female friend he is trying to make dress up as his favourite female character, and only talk about the interest? 😮
Speaking as someone with traits myself, you are under no obligation to continue being his friend.
I agree this may be linked to his autism, but you don't have to agree to this, or compromise.
Just because he wants something you don't have to go along with it. Even if you feel sorry for him. Focus on your own life.
If you're a young solo female friend you don't have enough social authority to fix him.
He sees you as his safe space (or potential partner) and doesn't care about your thoughts or opinions or feelings.
I had a similar friend when younger
Unfortunately it just wasn't possible to continue socialising with her as she was so rigid and obsessive and needed me to continually "compromise".
She wanted me fitting in with her obscure interests and reading the books she was obsessed with (and would get angry if she "tested" me and I hadn't paid attention).
I tried to encourage her to come along on group social events or develop broader interests, but she just wanted me to be her personal "safe space" and I wasn't going to take on that role for her.
Unfortunately her parents had not encouraged her to learn social skills as they were only interested in her having an impressive intellectual career and qualifications.
She even began sabotaging any interests or developing friendships I had that didn't have her as centre of attention.
I have some alternative interests, but I didn't want a life where I had to pretend that I cared about every detail of Dr Who or spend my weekends and holiday time going to sci-fi and fantasy conferences.