I have found the issue in captcha wordpress plugin. I changed following lines in the plugin:
if(!session_id()){
session_start();
}
To following line:
if(!session_id()){
session_start( [
'read_and_close' => true,
] );
}
The issue is reported already to the developers plugin page. I have found this solution in Stackoverflow.