Bound states in the continuum of higher-order topological insulators