How to adjust the color of iOS status bar when a modal is opened? (react)

This is what I got

This is what I expect

In my version, when the modal is open there is the status bar is white. what I want is black.

, another problem is the colour inconsistency between the status bar and the toolbar.

I know that the capacitor provides API to customize the status bar.
But I still want to adjust to in browser or Safari Shortcut, any possible solutions?