It does depend on the department at times. Seems most LE officers I know are carrying .40s, and most of those because of their departments' policies.
After starting out with a .45, Uncle Sam's department switched us to the 9mm. A heavier weapon like the Beretta is pretty forgiving in 9mm, I've not often seen someone who has any business carrying one not learn to handle it well in a fairly short period of time. I won't say the same for polymer-framed 9mms. They're lighter, and the muzzle whip of the 9mm is much more pronounced until it's trained out of the shooter.
Having carried one for awhile, the .45's greatest enemy was probably that it's not the most comfortable thing to carry - particularly from a psychological perspective. Really, you're going to carry a ****ed, single-action pistol around and rely only on the safety? (though most won't bat an eye carrying a round in the chamber of their 870, relying on fewer safety mechanisms than John Browning designed into the 1911). I've always hated to admit it though, but the 1911 seems to require far more training to bring a tyro up to speed than I've seen with the M9/M92. The recoil of the .45 is just a convenient excuse, IMO.
Though the 9mm goes through drywall like butter, it's pretty easy to defeat with most kinds of body armor. We shot a couple obsolete PASGT kevlar vests backed by some thin French-made (go figure) Iraqi body armor and the bullets stopped every time. Much ado is made of the Hollywood bandits and how poorly the officers' 9mms worked on them. Well, duh. What standard duty-pistol rounds WOULD have worked? If you need to blast through body armor, you need a rifle anyway.
I've only been acquainted with the .40 once at the range, and in a polymer-framed pistol. I like the .40 in that platform even less than I like the 9mm in it. And, having both 9mms and .45s at home, I consequently never felt the urge to add a .40.
I finally decided that what I really wanted were the heft and features of the Beretta, but in .45. Luckily, that's available in the SIG P220. The version I settled on, the Carry Elite Dark, includes a beavertail that many regard as unnecessary or even "silly", but which I do notice serves well to limit muzzle whip. The SRT trigger is a vast improvement over prior SIG triggers. Ergonomics are as close to ideal for me as I think I'll ever find. And, probably not surprisingly, I shoot it every bit as well or better than I ever did the M9 or M92 - or for that matter - the 1911. Still love my 1911s, but if I'm carrying other than to the range, I'm carrying the P220.