D1 Mini 4MB shows only 1MB

Hi,
when I compile my sketch using platformio I correctly see this output:

CONFIGURATION: Redirecting...
PLATFORM: Espressif 8266 > WeMos D1 R2 & mini
HARDWARE: ESP8266 160MHz 80KB RAM (4MB Flash)

but once finished building the sketch is says:

Building .pioenvs\d1_mini\firmware.bin
Memory Usage -> Redirecting...
DATA: [==== ] 39.3% (used 32196 bytes from 81920 bytes)
PROGRAM: [=== ] 29.6% (used 309068 bytes from 1044464 bytes)

why it says?
PROGRAM: [=== ] 29.6% (used 309068 bytes from 1044464 bytes)

shouldn't be 4MB of storage instead of 1044464 bytes?

thanks

what ia your setting for flash in Tools menu?

Juraj:
what ia your setting for flash in Tools menu?

I tried 4M (1MB SPIFFS) and 4M (3MB SPIFFS)

it continue to say that the max available space for programs is 1044464