HHH-9171 : Orphan removal does not happen for new entity element

(cherry picked from commit f549b88831ec23da7c44ef026b61f2cb8c5246ed)