On my first pattern I was able to trim the edges by selecting everything and then pressing shift + M while holding alt but now it's not letting me. Everything is unlocked and ungrouped.
What's going on here?
Shift+M is for the Shapebuilder Tool, not Pathfinder.
The easiest (and best) method to clip those edges is with a Clipping Mask
With a clipping mask, it is non-destructive, meaning you can come back and make changes later on.
Simply, create a shape over the area you want to keep (that rectangle works) and then select all and Right Click → Make Clipping Mask (Ctrl+7)
Note, your clipping path needs to be the shape above everything else as it will pick the topmost shape as the clipping path.