As you have probably figured out, prototypes are completely immutable at runtime. data.raw does not exist in the Runtime stage, and some of its components can be accessed read-only from prototypes.
My assumption is that you want to convert this mod into a runtime switch to let the player show/hide ore patches on the map whenever they want?
It may be most practical to ask the developers in the Modding interface requests forum to add a new field to MapViewSettings which would easily let you hide the ores on the map via the engine. (Or make a full blown suggestion instead for a proper toggle button on the Map interface.)
If they agreed to add it, you would almost certainly have to wait for Factorio 2.1 until we see it in the game.
Failing that, your most likely approach would be to hide them on the map permanently like you're doing already, and devise a method to draw them conditionally at runtime. I would look into the Resource Map Label Marker mod as an existing example of how you can do this.
That mod uses chart tags, which are shared per force. You might want to use rendering objects instead, which you can control per-player.
Instead of setting resource_patch_search_radius = 0 in the prototypes, you can set game.draw_resource_selection = false at runtime to disable the hover behaviour for ores on the map. This property is global, it cannot be set per-player.
Good luck!