Unfortunately, the only way to prevent it is to make sure that the same version of each family is loaded into both files before inserting the view. This can occur when the family is modified (to improve/fix something), but most often occurs (for us) when inserting from a different version. For example, we keep separate family library folders for each version of Revit. Those same files are loaded into our project template, but if you insert views from a project (or typical library) that's in an earlier version, Revit detects those families as being "different" - Revit's not smart enough to compare the contents of the families, I believe it just uses the file paths and timestamps. The solution is to reload the affected families into the SOURCE project to match the TARGET project. That's not always convenient, so it's usually easier to use something like pyRevit to manually fix the duplicates afterward (if it's a small number of families/types).
BTW, @kimberly_fuhrman-jones this duplicates the following ideas: