I've read a lot about this online this past while and it seems to be pretty neck and neck.
Makita are apparently better built inside but their batteries used to give trouble and Bosch tested them under use and pointed out the way they heat up under load which is the killer for Li-on. Dewalt has cheaper parts inside but have no battery issues. There's a YouTube channel by a guy called AvE and he is a tool engineer and takes all tools back to nothing, he's a bit mad to listen to but he knows what he's talking about and explains in great detail the quality of build in most common tools.
He reckons Dewalt Makita, Milwaukee are all mid range and are designed to just last 3 years under
standard use and then fail so you buy new ones, whereas Hilti is king followed closely buy Fesstool and Metabo, he's worth a view