@SSS26032002 She was just flirting with him really hard, but she's already dating someone. So on top of her being his student, her behavior is even more exasperating than it would have been otherwise. He's probably feeling defeated there because he's even less able to understand her actions in this situation than he's been able to so far with Miku.
Even if it's actually more along the lines of disappointment or whatever, he's more than allowed to feel that when someone flirts with him but they're already with someone. He's actually allowed to feel however he feels about anyone and anything. What he's not allowed to do, is act on those feelings in a way that would break the rules of the school or the local laws. After all, there's a very important difference between someone getting flustered by young women that are nearly legal adults anyway, and abusing a position of power over them such as being their teacher and pursuing them romantically or sexually.