Generally Google will list a site in its search results with the domain name, not the IP address associated with the domain name. But if you see both and if your site is crawlable via the IP, it is not going to lead to your site being deindexed by Google, said John Mueller.
John said this in a Reddit thread where the user said “my IP address is being indexed for pages and actually ranking.” Truth is, that is not so uncommon – I see it a lot.
John Mueller of Google said “having a duplicate via IP address is not great, but wouldn’t result in a site disappearing from Search.” He actually said something like this back in 2017.
John posted a very long response there about the site, saying his issues are likely not technical SEO related at all. Here is what John wrote, it is a good thread to read:
Forum discussion at Reddit.