getCSSProperty returns different values each time I run autotest

Here’s my code:

async $checkCSSProperty(getElement, cssProperty, expectedValue) {
  const element = await handleLocator(getElement);
  const value = await element.getCSSProperty(cssProperty);
  await expect(value.value).toBe(expectedValue);
}

await assertions.$checkCSSProperty(PassportPage.dateOfIssue, 'border', '1px solid rgb(250, 85, 85)');

Every time I run autotest, it returns the different value of border. Why do this happen and how to fix it?
When I run test I see that the color of the border matches the color I set in assertion, but it returns different color.

I tried to change function to

async $haveAttr(getElement, attr, attrValue) {
  const element = await handleLocator(getElement);
  await expect(element).toHaveAttr(attr, attrValue);
}

It returns null.