If it's a 2d game it must have a sprite renderer to be visible or invisible, it can't be an empty gameobject. Also, if you are testing in the engine then even if it's off the screen in the game view but you can still see it in the scene tab then it will still register as visible.
From the documentation
"Note that the object is considered visible when it needs to be rendered in the Scene. For example, it might not actually be visible by any camera but still need to be rendered for shadows. When running in the editor, the Scene view cameras will also cause this value to be true."