Puppet and DataplaneAPI at the same time

Hi,
We are managing config via Puppet, but there is a map file that we edit straight from the API, and what happens is that when we update that map file via API and had a server in drain state, somehow we loose the state of the node and it comes back as “ready”.
What are we missing ?