Object.defineProperty doesn’t return Object.entries [duplicate]

Why both object returns in console but only the first has entries?

let obj1 = {
  1: 1,
  2: 2
}

let obj2 = {}

for (let i = 0; i < 2; i++) {
  Object.defineProperty(obj2, i, {
    value: i
  })
}

console.log(obj1);
console.log(Object.entries(obj1));

console.log(obj2);
console.log(Object.entries(obj2));