They should give you exactly the same result.
Is that expected that in one case, your function f takes both submodels outputs (merged case) in the other case, it takes only the output of the second model (splited case).
Also try both cases with different random seed as it can just be that the training is not very stable.