The answer can depend on a lot of factors: what web-server is used, what web-server config is used, do you use php-fpm or else, etc.
Console commands like "export SYMFONY_ENV=prod" set environment only for console commands in the same session. But they can't affect your web server behavior.
When you open a page of your project in a browser, the application doesn't know anything about commands what you have typed in a terminal. If you see a debug console probably the app entry point is "web/app_dev.php", and the environment is defined here like:
$kernel = new AppKernel('dev', true);
Try to change 'dev' by 'prod'