Ajay,
There’s no way to disable the creation of the uart object in the Dot library. I don’t see why you couldn’t override that declaration if you’re sure you aren’t going to use the uart. You can create analog or digital objects with those pins and set them to a low current state or configure them like the example code does around sleeping to reduce current.
It’s up to you.
Cheers,
Mike