texture change to square after painting

In the material, click on the textures, and in the details choose, ‘sampler source’ = shared:wrap.