Also, please share any standard template of the postal code formats that Tableau can detect.
Tableau will only detect the opening 'Outward Code' within a UK postcode, So if you pass a full postal code, it will not recognise this.
A UK Postcode is an area, and marking this in Tableau as polygons is extremely difficult and the dataset required would be extremely large considering the long and lat points required. Also, in mapping postcode Outcodes, this only maps a single central point of the postcode Area within the UK.
You may find the data you are looking for in the link below. ** This is an external website and therefore take no responsibility for its content or its accuracy.
There are additional resources available also for Postal codes within the UK which should be easy enough to find.