After I change the position of something it disapears

When I change the position of something it disappears from game view but stays in scene view.

void Update()
{
    Vector3 mousePosition = Camera.main.ScreenToWorldPoint(Input.mousePosition);
    if (Input.GetButton("Fire1")) {
        transform.position = mousePosition;
    }
}

if anyone is wondering that’s what I did to change the position.

Not sure. Try debug.Log(mouseposition.x); and debug.Log(mouseposition.y) and see if the values are less than zero. Maybe something to do running in windowed mode?