Not only goalkeepers and midfielders are important in football, because of course all players on every line are important to be able to play well. Also, De Gea is not the only source of Manchester United's problems, because previously Manchester United also had problems in defense or with their defenders. So yes, even though De Gea can play well, but their defenders are very weak, so of course it is difficult for Manchester United's goal to keep clean sheets.
I don't think De Gea is a source of problems in Manchester United's defence, but basically their defenders haven't had a great run of form which is the source of their weak defence. But of course we have no right to blame any of them because the coach must be responsible for the strategy and choice of players who will play in the main line-up.
Some of us have said Maguire is not a good defender for Manchester United, but Ten Hag still used him in some games. I don't know, Ten Hag knows what the consequences are and he is responsible for his team's performance. So if Manchester United really wants to appear strong in defense, then they shouldn't just buy a goalkeeper, but several defenders are also important to bring in.