so, my experience is this:
01. i had the import statement (well formed, properly cased)
02. i had it identically referenced in a function that i was calling
03. and i was alling that function in my main
04. i had the Go extension enabled for Visual Studio Code
05. every time i would save - it would erase the import and then the .go file wouldn't build
cause:
i mis-cased the method that was part of the import
in my case, importing "strconv" and was wrongly-calling strconv.parseFloat
it should have been strconv.ParseFloat
it's a useful feature when it works - but it's unforviging.