I do not see any error in your bicep. And not be managed to re-produce the same issue as you. I wonder which bicep extension
you using in vs code.
My using bicep extension:
And I do not see the what-if
or validate
feature in this extension. Please correct me if I am be in wrong.