Why is my replicated actor duplicates after detach from other actor?

Multiplayer? Do you call the function as a rpc on the server? If not - it would explain your behaviour.