I am studying CS but I am passionate about electronics and hardware. However, I can't study CS and EE at the same time. So if I study electronics by myself with online courses, can I work in that field after graduation?
A friend of mine came out of university with a piece of paper saying he's electrical engineer. He has a bachelor in electronics but now what he's doing is virtualization, servers and networks, absolutely not related to what he studied (actually he told me that low level languages he learned were helpful for understanding how optimization works, but that's it), and he earns pretty well! I think your degree will matter only for a short period of time in the beginning, but if you can get a job in a field even if it's different from you education, you can use it to continue learning in that field by yourself. Your degree won't be the most important thing for your future employers, experience will.
Engineering tends to be pretty strictly regulated in terms of accreditation. It's much easier to be a software developer with an EE degree than the other way around.
If you want to do EE, try to switch to EE.