I have a very large mixture of both yellow and red tools. I think both manufacturers have top quality tools and batteries.
For me I like to have a mixture because of small preferences. I prefer the miluakee sawzall, and bandsaw to dewalt. I prefer dewalt for a small impact but Milwaukee for the big heavy duty. Etc…
Dewalt batteries are cheaper and are available in a wide range of power outputs. They have a shorter warranty period and do have a slightly higher failure rate than Milwaukee.
For reference, I probably have 2-3 dewalt batteries (out of 20-30) fail per year. They are almost always 6+ years old when they do. The Milwaukee batteries see less than 1 failure a year on average (out of about 20)