ALS-PT19 sampling issue

I created a PCB with ALS-PT19 light sensor(attached schematic and layout).
Basically it is connected like the standart LDR citcuit with a 10k resistor.
I am reading it with an esp32, getting only the max value of 4095 using this code:

int light;
#define LIGHT_PIN 32

void setup() {

void loop() {
  #define SAMPLE_TIME 100
  static unsigned int lastMillis = 0;
  if ( millis() - lastMillis > SAMPLE_TIME ) {
      light = analogRead(LIGHT_PIN);
      lastMillis = millis();

Using the same code with same configuration worked fine(responds to phone flashlight) with this LDR(through hole type):
What could be the issue?