Generally, opponents shooting after they been killed is caused by lag. Lag is a delay in communication between the player's action, the server's receipt of that action, and the subsequent notification of that action to all players in the match.

An online game needs to be maintained on a central server in order to avoid inconsistencies between individual clients (players with their devices). As such, the client has no direct control over the central game state, and can only update the local game state by receiving updates from the server. This need to communicate causes a delay between the clients and the server, and is the fundamental cause behind lag.

In the case of opponents shooting while dead, the player actually shot you before dying. However, due to lag, your device only gets notified of that shot once the opponent is already dead (making it seem like they are shooting you while they are dead).

If this is a common occurance, please double check this article for tips on how to improve your internet connection quality.