Rejoining a game without penalty is only possible during certain phases of the game and within a timely manner. If you leave a game either during the pre-game or during the first minute of the game, the game will automatically cancel (remember the 10 second rule does not apply to the leaver, but as a warning to other players that the match will cancel). You can rejoin the match during the initial hero selection screen if you are lucky enough to quickly reconnect though.
Otherwise, you can only rejoin any-time after one-minute of match time has passed up until the match completes. However you only have two minutes to do so without penalty. If you rejoin a match after two-minutes, you will still automatically be marked with a loss an be penalized with a -50 SR cut and a ten-minute suspension. This rule ensures that no one can abusive the leaver system by attempting to return to a match after deliberately leaving in order to avoid such penalties. Furthermore leaving three or more times in a single match will result in an automatic penalty. If you fail to return to a match by the time it ends normally (regardless of match result) you will be penalized.
Unfortunately all disconnections and game crashes counts as leaving the match and will be penalized appropriately. 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:
Fartbiscuits, if you are getting the Rendering Device Lost error, that means there is a malfunction with how your graphics card is working with Overwatch. I strongly recommend that you stop playing any further Competitive Matches and begin troubleshooting to resolve this issue. The tech support forum has a handy guide which resolves most RDL errors here:
Crashing or disconnecting is frustrating, but understand the leaver penalties works to help discourage bad leaver behavior and to discourage players from continuing to attempt to play Competitive if there is a known technical issue. If you need further help with the RDL errors post in the technical support forum where players like myself or Blizzard Support Agents can help out or start a web ticket.