History became legend, legend became myth.
Historians have always embellished historical records to make it more interesting. For example, Herodotus wove tales of Gods and Goddesses into the histories he wrote. Obviously, we know now that Gods and Goddesses did not exist. Royalty and Nobility often hired their own historians to paint themselves in a positive light while discrediting their enemies. That is why you have some characters appear as heroes and villains depending on which history you read. Events also greatly differ based on whose perspective you are seeing. That is why studying history requires reading various narratives and trying to piece together the most likely story from all the alternatives.
Padmavati here is a classic example of a real historical character whose story has been embellished and narrated in multiple versions. Similarly, Allaudin Khilji will also vary greatly as hero and villain depending on the perspective of the narrative.
Historical films typically try to put some investment into due diligence to present an authentic story. The degree of authenticity varies depending on the director's vision. Oliver Stone has a high degree of authenticity despite his penchant for cinematic drama. On the other hand, SLB plays really loosey-goosey with the authenticity. SLB bends and warps the narrative to fit the melodrama, romanticism, and high opulence that he revels in. It is perhaps better to view SLB films as "historical fantasy fiction" rather than purely "historical".
Another thing to remember is the Helen of Troy narrative. Some versions sell a love story between Helen and Paris. Some versions sell the rape and kidnapping of Helen by Paris. All versions make Helen a dramatic catalyst to the political conflict between Greece and Troy that culminates in War. Love or Vengeance makes a better storyline than two nations fighting.
1