How can i fix the resolution with texture painting?
I don't know If I understand you correctly BUT if you paint on a low image res you will get low res texture quality!
Here is a pattern I made painted on a 4098x4098 vs 256x256 texture:


My pattern is high res but when you project it on a low res texture you will get exactly that. if you want to get variable texture res on your painting I suggest you to check material painting in blender. You could bake it after that painting it to your desired resolution.