When did Bath, Somerset stop being referred to as The Bath?

I’m currently reading Moll Flanders. I’m struck by how Defoe constantly refers to the city of Bath, Somerset as “The Bath”. Checking Wikipedia, there’s no mention of this in the city’s history. Does anybody know when this practice died out, and the city got its modern name of Bath?

I’ve not come across it being called ‘The Bath’ before- Jane Austen, who wrote not that much later, had several books (Northanger Abbey being probably the best known) which mention visiting ‘Bath’, or ‘the baths’, but not ‘the Bath’.

I’ve found a few medieval references to ‘Bathe’ but none with a mysterious ‘the’ floating around. Just had a quick check, and the version I found had a lower case ‘t’ on the unnecessary ‘the’, which makes even less sense.