I cannot reproduce this with VS Code 1.94.2 using the search box on Julia extension v1.127.2, which when it is set to search "whole word" for "not" finds all of: "!not", "not", "not!", and "not."
However, if you search as a regex (the .* icon in that Search box) you can get what you want by searching for !?not[^!] which skips "not!".