PHP output started at php://input:1

In PHP I set a cookie using
setcookie($name, null, -1, '/');

However I get the following warning

Warning: Cannot modify header information - headers already sent by (output started at php://input:1)

which is even more strange, because I have ob_start() at the beginning of my PHP script.
I also set auto_prepend_file=NULL in my php.ini as described in Where could PHP output which started at php://input:1 be originating from?.

I use php-fpm 8.3 inside a Docker container, which is proxied by nginx.
As I understand it, php://input is a read only input stream, so where could the output be comming from?