LearnOpenGL author here. I actually took legal action a year ago against the Udemy teacher for copyright infringement. Unfortunately, when he started his series all LearnOpenGL source code was public domain (which seemed like the right thing to do), but that didn't strengthen my case against him. Nevertheless, there was still plenty of infringement to start a case, but Udemy took no further action upon providing clear evidence and left it in the hands of the course author, which obviously declined all serious copyright infringement. This left me no other option than to start a costly and lengthy legal process for close to no gain (the course author mentioned close to all of his sales have been through coupons as to imply he barely had any monetary gain from stealing content). We settled for an obligatory mention of his course being "Based on LearnOpenGL" (there used to be no mention at all).
The course author is a pretty big asshole, and caused me to update the source code license from public domain to attribution|non-commercial which is something I never intended to do, but have to because of people like him. I give Udemy the blame here; assholes are everywhere, but it should be Udemy's responsibility to have at least clear checks for plagiarism. And to make things a bit more fun, he even wrote a full book with the exact same content and letter-for-letter copy of the source code: https://www.amazon.com/Learn-OpenGL-Beginners-rendering-development-ebook/dp/B07H2YKGB5
I'll soon check what legal action there's to take on that end. It's a shame free and open content gets stolen for commercial purposes, to the loss for the reader. I agree with the other comments here; there are a lot of great Udemy courses there, but you should be very wary of what you're buying there as it's a big hit or miss due to the lack of quality control.
Edit: a small note here as some comments pointed out; if it was just about the source code my legal case wouldn't have been strong enough as it indeed was public domain at the same so taking legal action just for that would be a bit of an asshole move on my part. However, there were additional items he blatantly copied for which there does rest copyright (several images, teaching methodology, tutorial structure) which together does form enough of a legal ground to initiate a serious conversation; it was just the code that made it as obvious.