How to use template_include hook with form submission?

It turns out that $wp->query_vars[“post_type”] contains the data I need, regardless of whether the request method is GET or POST.

namespace mynamespace;

class MyPlugin {

    public static function template_include($template) {
        global $wp;
        if ($wp->query_vars["post_type"] == 'thing') {
            return plugin_dir_path( __FILE__ ) . 'templates/thing.php';
        }
        return $template;
    }
}

add_filter('template_include', '\mynamespace\MyPlugin::template_include');

Also, it appears that the reason this problem occurred in the first place is because I had named a field in the form with the same name as the custom post type. If I name the form field something different, then there is no issue.