I know this is very late input, but just wanted to share my experience with making my .40 shoot 9mm. I purchased one of those Detroit PD M&P's in .40 back in 2017, and was fortunate enough to get one that had been unissued and was still in a sealed box with everything. It is a very nice handgun and I got it at an excellent price.
I regularly do firearms classes for new shooters, and allow them to fire a broad selection of guns, so that when they purchase a handgun, they have an idea of what works for them. This .40 was my only M&P at the time. But for logistical reasons, it was simply easier for me to only bring 9mm and .38 Special ammo to range sessions, and in my opinion, the .40 isn't a great "first experience" cartridge. I did have some 17 round 9mm magazines left over from when I briefly owned a previous M&P. I had had a negative experience with a Storm Lake conversion barrel (which to their credit, they replaced for free), with the earlier M&P Compact.
So I took a chance, and purchased a factory 9mm barrel for $62, and just dropped it in the full-sized gun. With the range ammo that I use, which is 124 grain NATO ball, it has worked without a malfunction, using 9mm magazines, for about 1,500 rounds thus far. Accuracy is on par with .40 factory ammo, but we typically don't shoot any further than 25 yards, and more often within 15 yards or closer, so we are not demanding very much accuracy-wise. I have not noticed erratic ejection, but to be honest, I haven't looked for it either.
In examining the factory 9mm barrel, and measuring it with a digital caliper, the only real dimensional difference is in what I call the "ears", the two little tabs at the top of the barrel hood that engage the breech. On the .40, they are .425" across, and on the 9mm, they are .400" across. So you do have about .025" of potential play at that point. I've seen no problems with this thus far, but then again, I'm not asking very much of the converted gun. I would not carry this gun when converted in this way as a 9mm, nor bet my life on it. But for occasionally shooting the gun with cheaper 9mm ammo, I think it is probably fine. A true conversion barrel is probably a better solution if one plans to do much 9mm shooting, or is striving for best accuracy.
I then was lucky enough to find an unused factory .357 SIG barrel for the M&P, and it of course works wonderfully, and I personally love the cartridge. So, my $300 police trade-in M&P .40 now can shoot three calibers in a pinch, for a total investment of about $450. In the current situation which has produced some ammo supply problems, this is useful.
Cheers!