Like Brandon said, online classes do not conform to the ED visa requirements, the law says you need a minimum of 6 hours in person classes per week for the program to be eligible for an ED visa.
As much as people talk about it, I've never heard a single incident of anyone being arrested/deported for working illegally in a manner as described above. Immigrations asked me on numerous occasions during my TV extensions what I do here, I always say "I work from my computer in the US," never once had a follow up question.
Some will cite the arrest of a few Americans in 2018 for 'teaching english online' in Chiang Mai, but that was totally different. They were working in a building in Chiang Mai, for a Thai company, teaching Thai students, and being paid in Thailand.
I tend to disagree with that idea. It's illegal to work in thailand without a work permit. Working for a (lets say USA) US company, for US customers, being paid in a US bank, is not working in Thailand even though you may be physically located here. It's no more working in Thailand just as someone here for a week and checking emails or trading stocks isn't working in Thailand either.