From what I understand, the diary as published wasn't written by Anne but by her father largely/loosely based on her diary.
Your understanding is incorrect. There are two versions of the diary in Anne Frank's own handwriting - her original, and a more polished version she edited with a view to post-war publication. Otto Frank assembled the published book from both of Anne Frank's versions, excluding some passages but not adding new material. You can directly compare the three versions line by line in the original Dutch or in English translation in the Critical Editions published by the Netherlands Institute for War Documentation. The words are Anne Frank's, not her father's. He selected from the extant material, but did not re-write or invent.