This is totally normal. As it cools, it will set up. I’ve given a range of 20 to 22 minutes because every oven is different. I’d err on the side of slightly underdone. Baked too long, your pan cookie will get too hard as it cools and will be more likely to crumble when you slice it.