How to add a sub directory to WordPress single posts without affecting other post types?

If we look at the register_post_type documentation, in the rewrite option, there is a sub-option that controls this:

'with_front' => bool Should the permalink structure be prepended with the front base. (example: if your permalink structure is /blog/, then your links will be: false->/news/, true->/blog/news/). Defaults to true

So something like this:

    ...
    'rewrite' => [ 'with_front' => false ],
    ...

More information on register_post_type rewrite options

tech