In Logic Pro, Control-click the MIDI or pattern region, then choose Convert > Replace with Session Player Region from the shortcut menu.
The resulting Session Player region does not contain any MIDI edits you may have made.
Download the guides:
Logic Pro User Guide: PDF