I found the issue, and I want to share the solution for future visitors to this thread.
The problem was caused by the use of the annotation:
@ResponseStatus(HttpStatus.ACCEPTED)
This annotation was redundant in my case. It likely caused the connection to be closed prematurely, preventing the application from functioning correctly.
Solution:
After removing the @ResponseStatus(HttpStatus.ACCEPTED), the application started working as expected. If you're facing a similar issue, consider whether this annotation is necessary for your use case, as it might interfere with response handling.