Include-file shortcode context issues

Since Hugo 0.52. there is a new feature called Inline Shortcodes that enables the use of template functions and partials from within content files. It can also be used to call other shortcodes and it might solve the context issues you describe above.

Also I would think that it would be best if you provided a test repository with your use case.

As stated in the Requesting Help Topic (big pink banner at the top of this forum) users need to provide the source code of a project because the entire context needs to be seen.

If the project in question cannot be shared, I recommend that you create a minimal repo with sample content that illustrates the problem you describe.