UK immigration authorities may not recognise their extended stay in Poland
It would t be relevant to any visit to the U.K.
There's no difference if a visitor had spent time in Poland, Antarctica, their home country or on the moon.
You wouldn't be penalised by the U.K. for having been in the Schengen zone, nor would any days spent there count to any allowance you have in the U.K.
it's crucial to adhere to visa waiver guidelines in other Schengen countries and avoid exceeding the 90-day limit
There's a useful calculator here.
home-affairs.ec.europa.eu/policies/schengen-borders-and-visa/border-crossing/short-stay-visa-calculator_en