How to mask an animated layer in After Effects?
I found this post helpful: Preventing a Mask From Animating 


  
  Create a comp size solid above your text layer.  
  Apply the mask to the solid.  
  Set the Track Matte setting of your text layer to Alpha Matte.
  The text layer will now adopt the alpha channel of the masked solid.
  
  
  You can freely animate the text and mask independently.


I did not know the name of what I was trying to do. I needed to convert the mask layer into a Track Matte.