I had new tires put on a few weeks back (continental lx25). Pressure is excellent (around 39psi). The car says my mpg is 29 but my actual seems more like 25. This is with mostly highway. With the loaner for 2 weeks on similar routes, it averaged 29 actual. Definitely concerning.You said this lack of power problem happening before the repairs were done, so there’s nothing the dealer could have done to cause this.
What is the mpg of your CX-5? Have you checked the tire pressure?
If your 2018 CX-5 no longer has new car warranty, you still can take in to your Mazda dealer and complain the lack of power issue under powertrain warranty by saying you drove the loaner car and found your CX-5 definitely is lacking power. Or (somebody else may suggest) you may say you found the engine is lacking power since the repairs were done when the car was under new car warranty.
The whole thing is unfortunate to you. But your lack of power issue can be caused by too many possibilities. A thorough inspection with Mazda diagnostic computer may be the best way to figure out what is happening to your CX-5. IMO the transmission is the least likely culprit to your lack of power problem.