Python 3.8, 231231 227 bytes
def f(a,X=range(5)): for _ in[*X]*5while(b:b=[[=[[(i:=a[r][c])-i*any(all([r-2<R<r+2,c-2<C<c+2,(r,c)!=(R,C),a[R][C]==i])for R in X for C in X)for c in X]for r in X];a=[[X])!=a:a=[[([0]*5+[R[c]for R in b if R[c]])[-5:][r]for c in X]for r in X] return a
Try it online!Try it online!
Ungolfed and commented
def f(a): for _ in range(25):a=h(g(a)) return a # Replace connected integers with 0s def g(a): b=[[*i]for i in a] for r in range(5): for c in range(5): i=a[r][c] if I(a,r,c,i):b[r][c]=0 else:b[r][c]=i return b # Check surrounding cells def I(a,r,c,i): for R in range(5): for C in range(5): if r-2<R<r+2and c-2<C<c+2and(r,c)!=(R,C)and a[R][C]==i:return 1 return 0 # Drop numbers down based on positions of 0 def h(a): b=[[0]*5for i in a] for c in range(5): C=([0]*5+[R[c]for R in a if R[c]])[-5:] for r in range(5):b[r][c]=C[r] return b
Try it online!