2-Dimensional Bubble Sort
JavaScript (Node.js), 129 bytes



a=&gt;[...a+''].map(t=&gt;a.map((l,y)=&gt;l.map((v,x)=&gt;(L=a[y+1]||[],d=L[X=x],r=l[x+1],v&gt;r?r&gt;=d||(L=l,X++):v&gt;d||(L=l),l[x]=L[X],L[X]=v))))


Try it online!