When using a dynamic lookup where it is possible to delete an entry so it is removed from the lookup, retains the value in the related object odf table but is cleared from the UI.
An example would be creating a dynamic query that uses tasks (prtask table)
The UI will blank out the value. However the associated odf table, in this example the odf_ca_project table retains the value.
This is the expected behavior.
Once you commit that record for your project instance to the database, it remains. There is no association in the database back to the task, it only retains the ID or whatever field you have chosen as the hidden key on the lookup.
However, when the ID is trying to link back to the task based on the lookup used for the attribute, there is no value to match in the prtask table. Therefore the value is blank in the UI.
In order to validate a record before deletion an enhancement to Clarity would be needed.
Here is a link to that information
Enhancement Requests for Clarity