This is cool, but I see a couple of issues you may want to consider.
As a guitarist, I’m pretty familiar with these types of audio interfaces. The audio out on the headphone jack is likely stereo/TRS. The line in on the guitar jack is single channel mono. You can solve this by getting a split cable and plugging into both on the audio interface.
You’ll also want to ensure the audio interface jacks are set to line level. If it’s set to Hi-Z, there will be an impedance mismatch.
Good luck!