I was not enrolled for any class on my thesis. I was just paying the "Continuation in program" fees to stay current. As mentioned in the post, the HR said I was able to get 40 hours per week which is how I got the job in the first place. Its not some "under the table" paying job. It's a career field. I think your 20 hour reference makes sense for during the semester in a non thesis program. I wanted to know the rules of a thesis based program.
Thesis or Non-Thesis, there is no distinction. You cannot work more than 20 hours per week while on a study permit, period. The only exception is during scheduled school breaks such as summer breaks when people don't usually have to take any classes unless they want to.
On a thesis program, because you maintain continuous enrollment you wouldn't technically ever be allowed to work more than 20h/week.
The purpose of coming to Canada while studying is to do that, STUDY. That's exactly why they have this limit. If you want to develop a career and so on, that is what you can opt for a PGWP after you've graduated. The limit of 20h/w is also meant to keep people focused on their program so they will not take longer than planned finishing it, as in your case.
This is not a matter what you or anyone else finds fair, or how things should be. This is how rules have been set and the rules you were supposed to follow. You didn't. The consequences for you will most definitely be not be granted a PGWP and eventually will have to leave the country. Because you violated the conditions of your study permit and worked for more hours than you were allowed.
In addition, you will not be able to use any of that experience as skilled experience towards permanent residence application, because any experience earned while on a study permit is not eligible. And now, without a PGWP, you will not be able to earn any qualifying experience. At least not in Canada.
You could get lucky, but I wouldn't put my hopes on that.
HR from X company is not an authority to determine what you can do or not with your study permit. It was your responsibility to know this. The government has plenty of resources online where all these things are clearly laid out.