It seems from my tests that a script tag can be removed from the DOM without any impact on the JavaScript that it contains.
This test destroys the script DOM nodes part way through execution. Even this has no effect on the script, the variable count is assigned the value 1 after the script tag has been removed from the DOM.
<!DOCTYPE html>
<html lang="en">
<head>
<title> Test </title>
<script id="jQueryScriptTag" src="https://code.jquery.com/jquery-1.11.2.min.js"></script>
</head>
<body>
<button id="testBtn">Click to test</button>
<div id="output"></div>
<script id="testCodeScriptTag">
var count;
$("#jQueryScriptTag").remove();
$("#testCodeScriptTag").remove();
$("#output").append(
"<p>jQueryScriptTag is " + document.getElementById("jQueryScriptTag") + "</p>" +
"<p>testCodeScriptTag is " + document.getElementById("testCodeScriptTag") + "</p>" +
"<p>count is " + count + "</p>"
);
count = 1;
$("#testBtn").click(function(){
$("#output").append(
"<p>count is " + (count++) + "</p>"
);
});
</script>
</body>
</html>
The use case is safely removing injected third-party script elements from the host site.