The new() on this line:
@onready var bot_script = preload("res://Scripts/BotState.gd").new()
creates an instance of the BotState script; that is an object and not a script.
var new_bot_script = bot_script.duplicate()
simply creates a duplicate instance of the object (again not a script).
I am surprised isn't erroring out on you.
new() from the variable definition line and remove
new_bot_script and just
bot_node.key = node + 1
However, it is my opinion that the approach here is awkward.
I recommend creating a single bot node with attached script and then where and when you need a bot, create new instances of it. Those will come with their script already attached.