I don't know if this will help at all, but I don't think you need to call u8g2.clearBuffer() in your code, because you are using u8g2.firstPage() and u8g2.nextPage(). So try removing it.
Also I don't think you need to use u8g2.setFont() each time you print something. Use it only when you need to change to another font. In your code, you can put this in setup() instead.
U8G2_ST7567_ENH_DG128064I_1_HW_I2C u8g2(U8G2_R0, SCL, SDA, U8X8_PIN_NONE); // LCD GRANDE
Does your display work properly at the start of the sketch? That constructor does not look correct, here is the code from U8g2lib.h, with the arguments (rotation, reset, clock, data), instead of the order you use of (rotation, clock, data, reset).
So you do initially see the numbers on the display?
Have you tried with the I2C bus running at a lower speed?
How long are the wires between the nano and the display?
You are saturating the I2C bus with nearly constant usage, so that should show up any weaknesses in the communications with the display fairly quickly.
The GM12864-59N display with ST7567S-based unfortunately still turns off without apparent logic.
I thought I had little sram memory, since the arduino nano only has 2K, and the <U8g2lib.h> library uses a lot of it.
So I measured memory consumption using the <FreeMemory.h> library.
Arduino nano returns a value of 1201 free bites
Arduino mega 2560 returns a value of 7500 free bits.
so I think it's not a low memory problem.
Then I used the same sketch on the Arduino Nano 33 IoT and it works perfectly.
I removed the level translator because the Arduino nano 33 iot works at 3.3V and therefore compatible with the GM12864-59N display.
It ran for a few days without any sign of stopping. I turned it on and off several times to check the stability of the system.
The system is very stable.
Now the problem is that with the Arduino nano it freezes, and I've tried everything but I can't get it to work.
My project and the pcb I created only use arduino nano and I can't use other types of arduino.
I ran out of cartridges at my disposal.