Xbox One X disc drive not working

I have an Xbox One X and back in May I upgraded the internal 1TB hard drive to a Samsung 1TB SSD and since then my optical drive will randomly not be detected. It’ll take the game in just fine and sounds normal while reading it but it acts like there’s no disc drive hooked up. And if I use the Blu Ray app it will give me an error saying no disc drive detected.

I’ve reset the console a few times and it will work right after resetting but after it shuts down it won’t work. I’ve also done an offline update a couple of times and took the SSD out and wiped and reformatted it like originally done and the same thing. It worked on the first bootup but then wasn’t detected after it shut down. I’ve switched from instant on and energy saving modes and the only thing that I found that works without resetting is unplugging for a minute after a full shutdown and then booting it back up. I’ve had it for a couple of years now and I’m not sure if it’s a coincidence after swapping the SSD in or if I need a new disc drive/motherboard.