When playing with nanobots, removes nanobot dispenser and nanobots.
Some (probably unnecessary) detailes:
Keeps the recipies because they gives iron sticks and allow cliffs to be marked.
I faced the issue not when creating new world, but when loading pacifist mod into existing world with nanobots.
My thoughts:
It probably works that way because dispenser is a weapon and nanobots are ammo.
Technologies in this mod do not use military science.
Humbly suggested fix: not removing items when they are researched by vanila non-military science. This wold help this mod and probably some other mods that add tools as weapons.
Link to the mod:
https://mods.factorio.com/mod/Nanobots2