OKTA JWT Token is not automatically refreshed

Hi,
Am using OpenID with OAuth 2.0 with Angular as front end and .Net Core API as backend API.
When am leaving my application idle for few hours and when am using my application again then my api calls are failing with unauthorized error. when I refresh the page everything works again. why is okta not refreshing the JWT token or at least automatically reload the page if the access token is expired? Please help me resolve this issue.

It depends on your implementation actually. Okta refreshes access token if properly configured.