Scala 3, 565 476 460 458 447447 440 bytes
Golfed version. Attempt this online!Attempt this online!
Saved 118125 bytes (565->447>440) thanks to the comment of @ceilingcat
@main def m={val n=scala.io.StdIn.readInt();val M=Array.ofDim[Int](n,n);M(0)(0)=1;for(i<-1 until n;j<-1 until n){val z=M.slice(0,i+1);val x=z.map(_.slice(0,j+1));val y=z.map(_.slice(0,j+1));x(i)(j)=0;y(i)(j)=1;val d=1.0/(i+j+2);M(i)(j)=if(a(x,d)<a(y,d))0 else 1};M.foreach(o=>{o.foreach(l=>print(if(l<1)"."else 1));println("")});def a(m:Array[Array[Int]],d:Double):Double=math=math.abs(d*m.length*m.headOption.map(_.length).getOrElse(0)-m.flatten.sum)}