Who was that composer that made one of his student's teaching harder after finding out she had a significant other?

Sorry if I may be misremembering some details but I remember seeing somewhere(I believe it was tiktok) that a composer had a female student that he fell in love with but after finding out she was getting married, had gotten married, or had a boyfriend, he got upset and intentionally made the teachings harder on her?, was it Mozart? Beethoven? or a different composer? Or was it a fake story? I tried googling it but to no avail.