I suspect the problem is in the code of the shortcode itself, perhaps because the context is different than you anticipated when writing the shortcode.
You can verify that shortcodes should be parsed and output within a Layouts template by registering a [dummy] shortcode with the following code and inserting the shortcode in your template:
add_shortcode('dummy', function () {
return "Dummy text";
});
If you share the code of your shortcode I might be able to spot the problem.
As I mentioned, shortcode is working fine when included on a separate page but not working in a layout template. My first question is whether can I include a shortcode within a layout template or not?