This guide will tell you how to fix the Controller Not Working in Sekiro: Shadows die twice on PC.
First of all, you have to open the following link https://www.mediafire.com/file/1iwso16xklisj5p/x360ce_x64.zip/file and download the X360CE from this link. Once the file is downloaded, you have to right-click on it, then click on Cut and paste this into the game folder. In the game folder, you have to right-click on it and then click on Extract Here. After extraction, right-click on it and then click on Run as administrator.
Once the app loads, a warning box will appear, you have to click on the create button on that box. After this, the new device window will pop up, you need to click on Next, and then it will start searching for your device. Once the device is added, you have to click on Finish.
On the app, you have to click on game settings and then click on Add. After that, go to the game directory where the game is installed and then click on open. It will add the game to the app.
On the app, you have to checkmark the 64-bit v1.3 and then navigate down under the Input file. Checkmark the 64bit again, click on controller 1 and then click on the Save button. After this, you have to load your game and your issue will be fixed.