Does Magisk Hide provide protection against malicious apps?
Taken from the Magisk site here:


  Magisk Hide is the feature which is available in the Magisk Manager
  application and if you want to hide the root permission for the
  particular banking application.
  
  You can turn the Magisk hide option from the settings of the magisk
  application then you can easily enjoy your favorite app without any
  issues.


This means that you have to turn this feature on, then select the app from your list of installed applications that you want Magisk Hide to work for.  In the example on the site, they list banking apps, Pokemon Go, etc.  To answer your question, Magisk Hide would not prevent a malicious app installed on your system from "seeing" or accessing root unless you enabled it on that particular malicious app specifically.