ID-Properties as well as bpy.types properties show up in the Custom Properties panel, although they are separated from Python perspective (they aren't internally).
If you add a bpy.types property...
bpy.types.Object.prop = bpy.props.StringProperty()
bpy.context.object.prop = "foobar"
it will show in the Custom Properties panel, and you can change it there (even to `123` or `[1,2,3]`, it will be interpreted as string).
But if you click the Edit button and type e.g. `123` into the popup's value field and confirm, the property (`bpy.context.object.prop`) will be cleared and disappear from panel (there's no ID property with this name either).
If the property is a bpy.types property, there shouldn't be type casting, and it would avoid losing this property.
There's another issue if you use `.prop` as property name:
Try to add an ID property in the panel by clicking Add - it will try to create a property with the default name `prop` (+number if needed). But as there's a bpy.types property with that name, it seems to name-conflict and is removed immediately.
I guess it should check for bpy.types properties and use a name not already in use?