Grokking at the Edge of Linear Separability