Cancel a document without cancelling linked document

Any workarounds to cancel a document without cancelling linked document?

You can use on_trash hook to ignore linked doctypes.

Sample Implementation:

Thanks @Smit_Vora