Here’s an article discussing the historic facts and fiction of several recent movies.
Even if you’re writing historic fiction, you do have some leeway to change things. Consider whether the changes will enhance the story or the character development. If they will, generally it’s all right to make some adjustments to actual fact.