That may be more true today with more math heavy focuses like computer vision or neural networks. But most everything else is better learned on the job or via YouTube. Unless you plan to specialize like that, it’s almost certainly better to just teach yourself.
I’ve hired dozens of engineers from both university and self-taught backgrounds, and the self-taught ones are by far superior. In fact, it’s not uncommon that I have to break the bad habits taught in university - those courses are painfully outdated and the professors often have self-serving motives that hurt their students.