Hello,
populateDefaults function populate a Content field with HTMLText with default data at page creation. But this should not populate when the page is already created and page type is changed.
function overrides the content already present . I moved HTMLText to static defaults Content and the issue is solved.