Why I can still get cookies after clearing them?

My code is:

var cookiesAll = pm.cookies.all();
console.log('cookiesBeforeClearing= ',cookiesAll);

//clear all cokies
const jar = pm.cookies.jar();
jar.clear(pm.request.url, function (error) {
// error - <Error>
});

var cookiesAll2 = pm.cookies.all();
console.log('cookiesAfterClearing= ',cookiesAll2);

It definitely works: after it’s execution there are no cookies in the Cookies tab. But in console I get them both times. Why is it happening?
Screenshot 2022-03-09 at 19.42.16