We have a requirement where we have built a lightning app page(flexi page) and it has a LWC card component with a button in it. If the user clicks the button it is suppose to open a lightning record page. The requirement is to open the record page in the same tab as of the app page or we can choose home page. We are not able to open the record page in the same tab rather it opens up in a new tab in salesforce nav bar and this new tab can be closed as it has a x icon with it.
This is the code we are using for navigation in LWC
objectApiName: 'xyz__MyCustomObject__c', // replace with object api name
Please let us know if it is possible to achieve this?