Flex/Follow Tempo On/Off ⌃F — Logic Pro X keyboard command of the day

  Flex/Follow Tempo On/Off   ⌃F

Changes the “Flex & Follow” setting for the current region. Choices are Off, On, On+Align Bars, and On+Align Bars and Beats.

This allows you to adapt notes/transients to fit into bars and beats by changing the tempo accordingly.

Overview of Flex Time and Pitch in Logic Pro — Apple Support

You can configure how Flex Time and Follow Tempo adjust each region on a flex-enabled track using the Flex & Follow pop-up menu.