Set_prototype() does not changing factory's prototype

I don’t understand why this happens at all, but the prototype doesn’t change and no error is thrown.

for i,el in pairs(self.furnitures[self.currentHouse]) do
    factory.unload("#furnitureSpawner")
    factory.set_prototype("#furnitureSpawner", el.game_obj)
    pprint(el.game_obj, i) -- /main/gameobjects/furniture/bedroom/someobj.goc , 'i' variable
    print(go.get("#furnitureSpawner","prototype")) --Always same

    local furniture = factory.create("#furnitureSpawner",el.position)
    table.insert(self.current_house_furniture, furniture)
end

I also noticed that the prototype is from the game_obj variable of the last element from self.furniture[self.currentHouse]

I could be mistaken about what the question is, but this may have been discussed recently. I linked to this thread as guidance.

Sorry, but this post didn’t give me anything

Make sure your game object has been referenced somewhere so that the build system can create the .goc file of it.

They are referred in other collection which is connected by collection proxy

What if you as an experiment simplify it and skip the for-loop and only unload and change prototype once? Does that work?

I changed prototype to path as string and it works. But as I said, it does not give me any error.