systemd doesn't stop the service when the device is removed suggests adding a remove rule to udev which simply runs systemd --no-block stop SOMETHING.service
But what if the unit in question is a user unit, started with ENV{SYSTEMD_USER_WANTS}
? systemd --user --no-block stop SOMETHING.service
will fail, I assume because udev runs it as not the user for which the unit should be stopped.