and we guided you how to remove that category name by adding 2 lines of code which will help to show product name on browser title only.
This statement is self explanatory where the problem lies.
a. You have said that you guided by adding two lines of code on how to remove category code. See the two lines of code here:
$document = JFactory::getDocument();
$document->setTitle($this->product->product_name);
Do they look like category code removal lines to you? No, these are product display code in title, which is what I wanted. OK. Where is category code that was originally there? It must have definitely been commented out or removed.
b. I have been repeatedly asking, for the log purpose (in case we decide to restore category code) share the category code with line numbers from where it was removed from the file, so that it can be placed again, as and when needed. Even if we don't decide to restore it, it is our internal practice to log everything changed from standard code. Should be yours as well, to report all changes. Makes sense?