You might lose in the middlegame due to an opening mistake.
You might make poor opening choices due to not understanding the middlegame.
Same for the endgame. You can make poor choices in the middlegame because you didn't realize certain endgames were wins or draws.
Of course if you play for mate every game like a caveman, and either you or your opponent is completely winning by move 20, then it wont really matter.
Even if you play endings like Smyslov if you lose a piece in the opening or get mated in the middlegame it will do you no good . I reached NM by spending most of my study time on middlegames/tactics and openings , I did study basic endings but didnt need to study endings deeply until I was playing in open sections and regularly facing titled players . Examine your most recent serious losses ... are you losing in the opening , middlegame , or endings ? Maybe you are losing due to weak tactics ? Work on that phase of the game that is your weakest phase , this doesnt mean you should ignore the other phases of chess , only that you should put extra time/effort into your biggest weakness ....