After extensive investigation, I discovered that the issue was due to the data type used. In Kotlin, the Int type has a 32-bit limit, which can represent values up to 2,147,483,647 (10 digits). However, the integer received from the server had 13 digits, which exceeded this limit.
The fix
I changed the data type from Int to Long (which supports up to 64 bits) in the response class. This solved the issue, and the client started processing the response successfully.