Wordpress ignores the selected page template for a page if you set it as a static home page, which is pretty frustrating in certain cases.
You can force it to use the custom page template by using this filter:
/**
* Use selected page template for static home page
*/
add_filter('template_include', function ($template) {
global $post;
$page_template = get_page_template_slug($post->ID);
if (is_front_page() && $page_template) {
$new_template = locate_template($page_template);
if ( ! empty($new_template)) {
return $new_template;
}
}
return $template;
}, 99);