Can’t delete a custom post in front end with custom role

Look at line 63 of the code
https://developer.wordpress.org/reference/functions/map_meta_cap/

If you don’t provide a specific post, it is not allowed.

Your code is mixing meta capabilities with primitive capabilities. (yours are all plural or primitive)

“Meta” capabilities, e.g. ‘edit_post’, ‘edit_user’, etc., are capabilities used by map_meta_cap() to map to other “primitive” capabilities, e.g. ‘edit_posts’, ‘edit_others_posts’, etc.

The meta capability uses the object to make it into a primitive, but if you don’t pass it in the link, how can it be used?