Remove close on click outside modal

Hi,
what’s the best way to remove the close on click out on a modal displayed via ClientAPIs such as

showModal("custom-modal"); 

Thx!

Did you ever find a solution to this?