You say (but in comments, it should be in the Q proper!) that you evaluated the models by precision, recall and f1 score. Those measure all depends on you making a hard decision, which in the case of say logistic regression needs a probability threshold. You didn't say how you did choose that threshold, so assuming you did use the "default" of one half. There is in general no convincing reason to always use that default.
NoNow, using undersampling of the majority class, you effectively changed the threshold (in terms of the complete data.) If you just used a different threshold with the complete data, you probably would have seen similar results. It would be better for you to see the problem as one of risk estimation, and then evaluate the models using some proper scoring rule. Then you do not need to make a hard decision. Please read carefully Why isn't Logistic Regression called Logistic Classification? (including its links and references.)