Out of curiosity did you get this warning…
If you did, that is not because of leaving matches (or disconnecting from them. This is a warning stating that your behavior is in violation of the Blizzard In-Game Code-of-Conduct and if you continue this behavior you will be subjected to appropriate silences, suspension, or account bans (based on the severity and frequency of your behavior).
If you did not get that specific dialog, can you share a screenshot of the warning that you are referring to? (Or at least try to describe the text displayed and what colors the graphic is in.)
All disconnections and crashes do count as leaving and will be penalized. It takes as little as 5 leaver violations to trigger a season ban, and getting three season bans in your entire history of playing will result in a permanent ban from the Competitive Play mode. More details about the policy regarding technical issues and penalities policy can be found here: