The game must think it's a safety because the play began with you having possession of the ball, and if you fumble out of the back of your endzone then it would be a safety. However, if the recovering defensive player fumbles into
and out of your endzone, I believe it's still their ball at the spot of the fumble. I don't believe your team can regain possession without one of your players physically recovering the 2nd fumble.