This modification should work with any brand 18V to 20V power tool battery. Just make sure you get the correct housing attachment - or 3D print your own. If you don't get one with a switch mounted the vacuum will start running as soon as the battery is installed and will only stop if you remove the battery.
Note that the main trigger switch on the dyson is not an electronic switch so it cannot be used once you swap out the battery unless you do further modifications.
link to Milwaukee DIY battery mount with switch:
https://www.ebay.com.au/itm/274487452890