Loop inside stored procedure doesn't stop after query cancellation
You could have a look at running requests with either sp_whoisactive or with the below query and kill the session associated with the query / stored procedure.

select r.session_id
    , s.text
from sys.dm_exec_requests r
    cross apply sys.dm_exec_sql_text(sql_handle) AS s


Then you just execute the KILL command, like below, with the appropriate integer value from the above result, session which is associated with your stored procedure / query:

KILL &lt;session_id&gt;