This is how Xenobots depositor works. You cannot get it to deposit into a backpack unless you make your own scripts and write a custom lua depositor. The bot stopping attacking monsters is because it wants to leave the cave, you can turn off persistant leave checking in the config if you don't want it, but then you have to increase the leave amounts of all supplies.