The amount of time you are out of the match is recorded. Some above have mentioned they were disconnected mid-match but were able to re-enter and be rewarded as normal. In the case of a lengthy afk, the system may not be as forgiving.
Everyone understands that your internet may be out of your control, but your teammates are still down a player when the situation happens. Folks are reasonable when the AFK is short, but long AFKs are a problem even if your team ends up winning in the end.