Unfortunately all disconnections and game crashes counts as leaving the match and will be penalized appropriately. In the case of casual games, leaving too many games (including leaving and returning to the same game) can result in a experience gain penalty of 75% for at least 5 matches (which will increase if you leave more games). The game server has no way to discern a legitimate disconnection or game crash from one that is forcefully caused by a dishonest player to bypass leaver penalties. You can learn about this policy here:
Remember if you see the message, “Lost Connection to the Server” in the title screen or the message “Failed to Connect to Server” in yellow text in the text chat box, this means there is something that disrupted your connection to the game server and not a problem with the game server itself. There can be a variety of reasons this happens including those that don’t disconnect your computer from the Internet. There is great troubleshooting to start with that can most likely resolve most issues and I encourage you to check them out here:
As always if nothing in that guide works, please head to the technical support forum and start a new post saying you completed these steps and additional advice can be provided. Good luck!
(^^)v