Is that error coming back from the token endpoint, or the authorize endpoint? I’m guessing its the token endpoint, from previous experience with similar errors, so there might be an issue with how the client auth was passed along in that request.
Have you tried comparing the raw network calls that the application makes to Okta to see what changes when you remove your loginPage?