Robot is taking library path instead of Project Path

Problem is as same as but without error also it is changing the current directory path and issue is intermittent
Environment.CurrentDirectory changes after error in custom Library - Help - UiPath Community Forum

Check the UiPath.Constants.Project.Location details from https://docs.uipath.com/studio/standalone/2023.4/user-guide/about-libraries#limitations-when-using-libraries