Overriding default template if page slug and post type are same

Easy way to achieve this.

register_post_type( 'mypost',
    array(
        ...
        'has_archive' => false,
        ...
    )
);

After updating this reset the permalinks ‘Settings -> Permalink’

error code: 523