Lewis Hamilton says Ferrari made "the smartest decision" to freeze the position of their cars for the final laps of the Qatar Grand Prix given recent incidents after Charles Leclerc finished on his tail for sixth place.