With your code as it is, it's overwriting the default masks of some entity types with what you have set as a default. You can see the default masks in the \Factorio\data\core\lualib\collision-mask-util.lua file. While many are what you are using, some are not.
I suggest adding this to the top of your file:
local collision_mask_util = require("collision-mask-util")
And then changing these lines (145-151):
if prototype.collision_mask then
table.insert (prototype.collision_mask, "resource-layer")
log ('added: ["' .. prototype_type_name .. '"]["' .. prototype_name .. '"]: ' .. serpent.line (prototype.collision_mask))
else
-- prototype.collision_mask = {"item-layer", "object-layer", "player-layer", "water-tile"} -- default
prototype.collision_mask = {"item-layer", "object-layer", "player-layer", "water-tile", "resource-layer"} -- one more
end
To this:
local collisions = collision_mask_util.get_mask(prototype)
collision_mask_util.add_layer(collisions, "resource-layer")
prototype.collision_mask = collisions
log ('added: ["' .. prototype_type_name .. '"]["' .. prototype_name .. '"]: ' .. serpent.line (prototype.collision_mask))
This allows the code (via .get_mask) to pull the current mask or appropriate default if nil, then .add_layer makes sure that it is only present once (in case another mod already added the "resource-layer" to one or more entities), and then finally you're setting the new mask table back to the prototype.