I am using ILI9341 library.
As per information, for text size 1, 5x8 pixel will be use and it will be multiply by size.
If it is not so, then how many pixels it will take in different text size.
I am using tft.fillRect (x,y,width,height,background color) to overwrite the digit on particular pixel position.
I am not aware of any library called ILI9341. Please post a link.
All the same, your fillRect() method looks like an Adafruit_GFX style method.
The system font is 5x7 which means you allow a 6x8 box to give a space between adjacent characters.
If you use setTextSize(2) you will need a 12x16 box.
Since the system font is monospaced, it is easy to calculate positions, lengths etc.
The Free fonts are proportional. You have to calculate the size and postion of any previous character before you know what to rub out. Very complicated when you want to overwrite i with w.
Many proportional fonts have different width letters but specify digits with equal width. It makes invoices easier to read.
The simplest solution appears to be to use David's suggestion of specifying a background colour for the text, viz:
setTextColor(foreground, background);
If the text is scaled then the Adafruit library will aoutmatically scale the backgorund area drawn unless you are changing the size of the drawn text from a large to a smaller size as the numbers are changing.