My issue with Yabe has never been with him not dating the student, thats definetely a no no.
My issue with him is that he always acts like some know it all sage about love and feelings when he apparently has never had a relationship, is apparently just early or mid 20s (So not even that wordly yet) and had a perfectly valid chance to get with Nagisa, an adult of around his age who had feelings for him.
I think that as a teacher you could also cherish your students feelings and just tell them stuff like "if you like me a couple years after you graduate you can try again".
Regardless, he still has no leg to stand on, he needs someone like her to constantly be on his face or he is legit gona end all alone, Nagisa tried the subtle normal way for years and it never worked.
Im just glad this is a rom com and they are definetely gona end up together cause the dude really needs a happy ending, he is a good person.