Sony only has the rights to Spider-man for film. Marvel Ultimate Alliance 3 came out on switch almost two years ago and has all the X-men and Spider-Man characters. As long as the version of Spider-Man isn’t the movie version, Marvel can do what ever they want with him in games, comics, toys and merchandise.
This was also the case with X-men and Fantastic Four. The reason they chose not to use those characters in MVCI was to fuck over Fox because they were passed Fox wouldn’t sell them the movie rights back, so they basically buried those characters because they didn’t want to help promote characters they couldn’t make movie money off of.
The only characters Disney does not have exclusive film rights to right now are Spider-Man and Spider-Man related characters (though they reached a deal to use Spider-Man in the MCU) and the Incredible Hulk who Universal Studios own the rights to all Hulk SOLO movies. This is why there haven’t been any solo Hulk movies since the Ed Norton movie because Marvel doesn’t want to share profits with Universal, so they just put Hulk in team up movies.
So to recap, Marvel, from a video game standpoint, can use any of their characters they want, and they ALWAYS could use any characters they wanted, they simply chose not to promote certain characters for a time as a way to pressure Fox into giving them the movie rights back to certain characters, which is now no longer an issue since Disney outright bought Fox.