Only thing I'm considering is a thinkpad x1 carbon. But the last time I tried putting linux on a laptop I had a few issues submitted to the linux kernel and still didn't have the laptop working perfectly (Asus zenbook) within a week I returned it and bought a MacBook pro. Might be time for another go.
I believe Thinkpads are famously easy to make work with Linux. I had one in college (a decade ago) and an x1 carbon when I was at Google (several years ago) and both of them were excellent (though the latter obviously would've had any kinks ironed out by the Goobuntu team).
My last couple laptops had better hardware (for my needs) than ThinkPads or Macbooks, but the occasional compatibility issue is enough that I'm thinking about switching back to Thinkpads.
Consider it's brothers, the 3-digit X and T models, which, especially in form of premature leasing returns, have excellent price for the value. And due to the stagnation with CPU power, all from Haswell should be well within usable.
Just get a Dell XPS developer edition. It is what an MBP is supposed to be but actually delivers for roughly the same price or less depending on configuration.
Oddly enough it has gone completely away on my 2017 model. I can only guess a firmware upgrade fixed it, which is probably unlikely. Or getting jossled around in my backpack got it aligned?
Ubuntu has worked perfectly on my last two thinkpads, an X220 and X1 Carbon (4th gen). That's almost 7 years now. I think only the only real caveat is that the fingerprint reader isn't supported. I can't speak for other laptop brands, but just get a thinkpad (or a dell xps).
I recommend the X1C. I had a first-edition. It was wonderful, and lasted me for five years. Last year I upgraded to X1C5. It is far lighter still, the keyboard is good, it is just a joy to interact with. (debian stable)