In the end, if you want to configure the secret in the backend, you need to create two different clients.
Following this blog helped me a lot to understanding it: Secure Frontend (React.js) and Backend (Node.js/Express Rest API) with Keycloak