The problem with your small example is that you are using in_channels=out_channels=1, which would return the same output.
However, as explained in the previous post, this won’t be the case for multiple input channels, since the convolution will sum over the in_channels dimension:
md = nn.Conv2d(3, 3, kernel_size=[1, 1], stride=(1, 1), bias=False)
with torch.no_grad():
  md.weight.fill_(1.0)

x = torch.ones(1, 3, 4, 4)
out = md(x)
print(out)
> tensor([[[[3., 3., 3., 3.],
          [3., 3., 3., 3.],
          [3., 3., 3., 3.],
          [3., 3., 3., 3.]],

         [[3., 3., 3., 3.],
          [3., 3., 3., 3.],
          [3., 3., 3., 3.],
          [3., 3., 3., 3.]],

         [[3., 3., 3., 3.],
          [3., 3., 3., 3.],
          [3., 3., 3., 3.],
          [3., 3., 3., 3.]]]], grad_fn=<MkldnnConvolutionBackward>)

You could use a grouped convolution instead (but it might not fit your use case):
md = nn.Conv2d(3, 3, kernel_size=[1, 1], stride=(1, 1), bias=False, groups=3)