EDIT/SOLVED: It seems like this was due to a caching issue. For some reason, "drush cr" didn't clear the cache properly, but it seems like clearing the cache from the admin panel did the trick.

Original post below:

I am overriding a node template for a specific view, using the name scheme node--view--view-name.html.twig.

This works well when the site is in development mode (using include settings.local.php from settings.php). When I exit development mode by commenting out that line in settings.php, the template override reverts to the default template. All other overrides seems to be working as expected.

What could be causing this? Is it a bug in views, or is there a setting I could move from settings.local.php to settings.php to make it work?