Borcherds algebras and $ \mathcal{N} = 4 $ topological amplitudes