If sometime in the past 300 years the British government had formally incorporated Gibraltar into the UK the way Hawaii is a part of the US or French Guiana is part of France, would Spain's complaints about British sovereignty over Gibraltar, and periodic attempts to regain the territory, be any less frequent? I think not.
The difference in the treatment of a land and its people as equals to the rest of the country's citizens and states is what makes Hawaiians regular Americans and Ceuties regular Spaniards, and what keeps Llanitos from being British _citizens_.
To answer your question: yeah, if Gibraltar was a self-sufficient state within the UK (instead of an -arguably- geo-strategic colony that is a tax haven according to the OECD) you likely wouldn't hear as many complaints about it.
Take for example the cession of Sardinia in the very same Treaty of Utrecht. You ever hear complaints about its sovereignty?
If Sardinia were not an island hundreds of miles away, but a large peninsula physically connected to Spain, yes Spain would very much actively try to regain the territory. (Probably much more of a priority than Gibraltar.)
https://www.gibraltar.gov.gi/press-releases/gibraltar-retain...