Hello Swarnim,
I have been doing further tests as follows:
- I created a completely new trial project
- I created a new SA on it
- I created a new key for that SA
- I am getting again a key with no expiration
I suggest just as a test trying in a new project in order to check if there is some configuration in your current project that is limiting the expiration.
I would also review if you have any organization policy configured in your project or parent folder/organization related to keys or services account that may be affecting this behaviour.
Nevertheless, so far I didn't find any configuration that changes this default behaviour.