12 Hong Kong residents, including an activist charged under the city’s National Security Law, have been detained by China’s coastguard while trying to flee to Taiwan.