How to render a template file using shortcode inside a plugin

locate_template() only look for a specific template in themes, not in plugins, so your function wil never work. This also goes for get_template_part() which is in essence just a wrapper function for locate_template().

You will need to use funtions like file_exists() to check whether or not the required template exists and then use something like include() to load your template. You can use the above to write your own function like locate_template(), this is at least what I will do, and have a fallback to lacate a template in themes should the template not exist in the plugin.

Just a note, always always first check if a value/template/condition exists before doing something with it. This will avoid unnecessary bugs and issues should a failure occur. Also, have something in place like returning false, adding a redirect, exiting etc etc to safely handle your code should you have a failure