Custom script file enqueue has “?ver=4.5.1” when loading and doesn’t update

I agree with @Mark Kaplun – what you’re describing is an odd behavior though. Try this markup to override the $ver param.

wp_enqueue_script( 'script', get_template_directory_uri() . '/js/script.js', array ( 'jquery' ), null, true);

https://developer.wordpress.org/themes/basics/including-css-javascript/

Alternatively, to work around the version cache try this markup which will generate a unique version with each page load.

wp_enqueue_script( 'script', get_template_directory_uri() . '/js/script.js', array ( 'jquery' ), rand(1, 100), true);