What is the best Windows based machine out there these days? What brand?
The best Windows machines are the ones you build from parts (desktops).
If you want a laptop, the best bet is to get either one of the Microsoft Surface devices, or a gaming-grade laptop (Razer Blade or similar).
We use Lenovo laptops at work and they're usually just fine. I don't know what kind of experience you had with them but in my experience they tend to be the most reliable laptops ever made.
Not a fan of Razer... all of their peripherals seemed to be low-end crap quality wise, every Razer mouse I owned was dead before being 2 years old (been through 3 already, and not with heavy use (I have 2 seperate PCs, so each only sees 1/2 as much use as usual, mice have been divided between the two))... Logitech Mice that replaced them have been running for 3-4 years and are still going strong.
To be fair, all of the Razer mice gave in because of the double click syndrome, or because the button went dead. Seems to be a re-occuring fault with all Razer mice, their Button mechanism seem to be especially cheap even on their most expensive mice (Razer Naga Wireless).
Now, I haven't owned a Razer Laptop once, but given their quality issues with mice, I wouldn't pay the outrageous prices they always ask for their stuff for getting a Razer Laptop. Razer has become, together with Alienware, the Apple of gaming PCs... extremly hyped, good looking stuff (subjective, I don't like the Razer look), sold for way too high prices... just without the guaranteed quality you get when buying Apple, at least in case of Razer.
But I can vouch for MS Devices. MS has quickly iterated to make their Surface devices extremly sophisticated technically, and the quality AFAIK was rock solid from the start... the devices are also not cheap, and MS had to make it work, so its kinda 'expected', still very nice devices.
I have used Dells and HP Business Laptops for work. Quality was Rocksolid. Machines were (are) in use way way, WAY longer than they should (received my current Laptop at work about 7 years ago. Struggling with bad performance by now)... but the machines are still going strong.
Most of the time you have different classes of devices with different target audiences, price points and thus quality.
Budget devices -> everything done to lower the price. These are your sub 500$ desktops and your sub 1000$ Laptops. These devices are aimed at the usual jon doe that just wants to surf the web and write documents at home. Usually performance is adequate for that, but don't expect good quality cases or the most sophisticated internal layout. For laptops, Screens are usually crap, sometimes the keyboard and cooling also sucks.
Gaming devices -> there are also budget gaming devices that are compromising on performance, but sometimes also on quality. Generally though, gaming devices are priced way way WAY too high for the performance they offer. Thus, if the builder has a name to loose, he has more than enough dough to invest in quality. Thus generally, gaming devices from big name builders are good quality... MSI, Gigabyte, Alienware... with the usual suspects selling lower quality at similar outrageous prices, and outliers for the brands that usually build good devices.
Business class devices -> these devices are often expensive even though they don't pack quite the performance we usually expect for such a price. Part of that price is a price hike because a) businesses can afford it and b) the brand offers a different support package for such devices if sold over the right channel. But of course you can expect better quality parts being used. Business class laptops are expected to be used a lot by road warriors, and both laptops and desktops are expected to run 8 hours per day constantly... which is way more than your usual home machine.
Premium devices -> Marketing came up with this category, so its not so clear cut like the others... there are devices which basically are neither gaming nor business devices but are quite pricey for the more sophisiticated buyer, intended for home use. These are well designed machines apeing Apples approach to sell their machines with Design and ease of use, and quality. I guess the Surface devices could be placed here given they are certainly no gaming devices, and not really meant as business devices (business devices are usually not very designed. They look utalitarian rather than stylish).
I am not going into the Workstation class of devices, quality of these usually is unquestioned given the price and the support contract the builders offer.
You will find a range of quality within every class of devices. Given that most people on this planet buy the cheapest device they can find, and most of these are still bought for home use, you can expect budget devices to make up a huge chunk of PC sales. So the total number of user expieriences in the PC space will always bias towards devices which do compromise on quality intentionally to keep prices down.
Thus, TL;DR: you always have to look at the exact machine people complain about when they complain about Lenovo, HP, Dell, or whatever. All of them produce gorgeous designed premium machines, tank like business machines, extremly fast gaming laptops... and cheap crappy budget devices. If a 500$ Dell laptop is of a crappier quality then a 2500$ MacBook Pro... well, the numbers you paid for them should have warned you before the fact actually. You can probably get a good Dell Business Laptop that rivals the MacBook Pro on performance and Quality, MAYBE designwise (maybe not... subjective topic) for 1500$. Still cheaper than a MacBook... just not 5x cheaper.
And yeah, prices pulled out of my A**... this is not meant as an exact price comparison.