https://wordpress.org/support/topic/are-wordpress-plugins-au...
https://wordpress.stackexchange.com/questions/406337/does-wo...
https://wordpress.org/support/topic/are-wordpress-plugins-au...
https://wordpress.stackexchange.com/questions/406337/does-wo...
Something like the following would be a valid plugin, but it doesn't directly or indirectly use _any_ code by WP. It's only executed by WP. I don't believe that it would be considered a derivative work of WP, because that file would happily run without WP as well.
<?php /* Plugin Name: My Plugin Version: 0.1 */
if($_SERVER["REQUEST_URI"] === "/my-url") { // do something interesting, use curl to fetch some content }
In addition to your example, I can imagine a very defensible scenario where a plugin is "standalone" with a shim layer to connect to WordPress (and maybe other CMSes, too).
The one case I just remembered where it was remotely challenged was Thesis [1], but Automattic chose to throw money into bullying the challenger rather than going after the alleged license violation.
[1] https://wptavern.com/mullenweg-and-pearson-square-off-on-pat...
The plugin‘s author breaches the core‘s license, but that doesn‘t make the plugin GPLv2 by itself.