For Kantian, they focus more on Maxima than the result when determining the action is morally right or wrong. So in this example, when a Nazi officer asking whether you are harboring Jewish fugitive, if we lie that we do not harbor Jewish fugitives, regardless of the result, our maxima here is saving the Jewish fugitive's lives and it is morally right.
I disagree that this strategy is ultimately consistent with the formula of Humanity. Because if we lie to the Nazi officer, we treat the fugitives as ends but treats officers as a tool which is incorrect. Similarly, when Nazi officer asking the question to us, they are treating us as a tool to fulfill their own goals which are also inconsistent. Therefore, I disagree that this strategy is ultimately consistent with the Formula of Humanity.
The danger may be that the officers found out the lie and still kills the Jewish family. In this case, the result does not achieve the maxima that we want.