I have the same problem with always the same sensor here. Sometimes disappears/deleted and then later it comes back again with the discovery process. I also have it as YAML detected. Will do some tests with php later .
This problem still exists. I decided after updating to the latest nms version to see about adding some state sensors but the same thing still happens. I run discovery.php, the sensor is added and discovered, polls normally, and alerts normally.
When the dispatcher or discovery wrapper run the sensor is deleted with each round, then added back the next round. I have tried both the cron based discovery and the dispatcher.
The only information about it in the logs is the sensor is deleted. This appears to only happen when using the snmp extend function to add sensors. I have one OID that provides a 0 or 1 integer.