I don't think it was a straight guy whose spirit visited him. Notice how he hesitates and says "ex" instead of gf. So, I think it hints that his male lover married a woman. And I think he showed up on that veranda because maybe it used to be his lover's. And maybe he started to fade because he was growing to be attracted to the MC. Or if it wasn't his ex's place before he got married, then maybe the ghost-guy had seen and found the MC attractive and connected with him. In the end, I think they're both attracted to each other.
Somehow I pitied matsudaharai-kun or something he's name what is well I'm pitied him somehow bc it seems like it's one-sided and more he got crush on straight man uughhh need more of sensei work!!! T^T I bet it would be another sensei's masterpiece huhu