Click on this link to read about activation lock for Mac--> Activation Lock for Mac - Apple Support
How to enable Activation Lock
How to disable Activation Lock
If you know a relative of the deceased, ask them to: How to request access to a deceased family member's Apple account - Apple Support
Then have them remove the lock.
If you were given the original receipt, Apple can completely reset a device if a person can provide sufficient evidence of valid ownership. Do this online at: Activation Lock support request - https://al-support.apple.com/#/additional-support Apple says, "Proof of ownership documentation is required," but does not state what currently constitutes proof. Prior to this new online service Apple typically required the original receipt issued by Apple or an Apple Authorized Reseller and documented provenance (so typically it would be the original owner who does this, or a descendant with legal proof of ownership).
Apple recommends you "Keep your receipt after you buy an Apple device" --> Keep your receipt after you buy an Apple device - Apple Support