Why my text is overwritten on previous one?

In my project there is a Main Camera and a Text UI on a Canvas and the below script.

Why is my text get superpose on the previous text after pressing the spacebar and how can I avoid this behaviour?

using UnityEngine;
using UnityEngine.UI;

public class PlayBoard : MonoBehaviour
{
    static Text message; 
 
    void Awake()
    {
        message = GameObject.Find("messageBox").GetComponent<Text>();
    }

    void Start()
    { 
        message.text = "To begin press space bar";
    }

    void Update()
    {
        if (Input.GetKeyDown("space"))
        {
            message.text = "New Message should appear in clear";
        }
    }
}

Finally I had to put the Unity Project to the recycle bin and start a new one using exactly the same script. This time the text field does act normally. I assumed that something was corrupted in the many lines of code Unity add to make a project work.

Ok, had this happening for awhile and finally figured it out. The Camera was only covering like 90% of my Game Window area. The place where the UI text was, was actually out of the Camera frame. Since the background was black I didn’t notice the difference. Any UI outside of the Camera frame acts funky. As soon as I moved it into the camera frame it worked perfectly.