Historical based movies or television series are often matched with the history they depict. Historical fiction is where historical events or people are present but the actual story is fiction. Herman Wouk’s Winds of War is an excellent example. The journey of the Henry family was fictional though set during the events of World War II.
James Cameron’s Titanic is a great movie, won numerous awards, and still gets praise today. The central characters were fictional but took place on the Titanic. Cinema Blend took a look at the movie and compared it to what really happened. They found it was mostly accurate but not completely. Jack and Rose were fictional but most of the supporting characters on the ship resembled their historical counterparts. Cinema Blend notes adding this made the story telling better especially in the case of Ida and Eva Strauss holding hands.
Other things such as the barricades or guns being fired were more conjuncture than real. Yet they provided emotional drama for the movie, which is why they were there. The key to remember is that filmmakers will tinker with historical details for a variety of reasons. In really bad ones they shift a lot of things around for drama rather than historical accuracy.
For instance Scarlet and Black, a 1983 miniseries, was based on the real life exploits of Monsignor Hugh O’Flaherty. O’Flaherty helped allied prisoners of war (and others) in Rome during World War II. But it strayed quite a bit from the historical source material it was based on for entertainment purposes. So while highly entertaining, much of the telling was altered.
In this case Cameron stayed more or less with history when it mattered. And let Jack and Rose be exactly who they were in the movie about their fictional love story.