2012 Chevy Malibu slipping transmission

If the problem isn’t found to be elsewhere, if I had that problem I’d start w/a proper transmission maintenance service. Replace the fluid & filter as applicable. Auto-trans have to build up a really high pressure in the hydraulics to create the force needed to effect the gear change. If any of the seals aren’t holding pressure, b/c they have grown stiff with age & temperature for example, this could occur. New trans fluid will have fresh seal-conditioning chemicals which will help return some of the seal’s flexibility.