(* Proper -> Comoving *)

d1={dt,dr,dθ,dφ};
d2={dt,dR,dθ,dφ};
n=4;

"Input: FLRW, Proper"

g11=gtt=1-(a'[t]/a[t] r)^2;
g22=grr=-1;
g33=gθθ=-r^2;
g44=gφφ=-r^2 Sin[θ]^2;
g12=a'[t]/a[t] r;
g13=g14=g23=g24=g34=0;

m1={{g11,g12,g13,g14},{g12,g22,g23,g24},{g13,g23,g33,g34},{g14,g24,g34,g44}};

M1=MatrixForm[m1];
Subscript["g",μσ]->M1

"Output: FLRW, Comoving"

dr=a'[t] R dt+a[t] dR;

m2=FullSimplify[Table[Sum[D[d1[[k]],d2[[i]]] D[d1[[s]],d2[[j]]] m1[[k,s]],{k,1,n},{s,1,n}],{i,1,n},{j,1,n}]];
r=R a[t];
M2=MatrixForm[FullSimplify[m2]];
Subscript["g",μσ]->M2

Quit[]

(* Comoving -> Proper *)

d1={dt,dR,dθ,dφ};
d2={dt,dr,dθ,dφ};
n=4;

"Input: FLRW, Comoving"

g11=gtt=1;
g22=grr=-a[t]^2;
g33=gθθ=-a[t]^2 R^2;
g44=gφφ=-a[t]^2 R^2 Sin[θ]^2;
g12=g13=g14=g23=g24=g34=0;

m1={{g11,g12,g13,g14},{g12,g22,g23,g24},{g13,g23,g33,g34},{g14,g24,g34,g44}};

M1=MatrixForm[m1];
Subscript["g",μσ]->M1

"Output: FLRW, Proper"

dR=dr/a[t]-a'[t]/a[t] R dt;

m2=FullSimplify[Table[Sum[D[d1[[k]],d2[[i]]] D[d1[[s]],d2[[j]]] m1[[k,s]],{k,1,n},{s,1,n}],{i,1,n},{j,1,n}]];
R=r/a[t];
M2=MatrixForm[FullSimplify[m2]];
Subscript["g",μσ]->M2

Quit[]