Trying to make a timeline where an image fades in and fades out. (Rest in desc)

Trying to make a timeline where an image fades in and fades out. It works fine but when I play the game it fades in, but refuses to fade out.
https://www.youtube.com/watch?v=O2uTylvZagk

How are you doing the fade? What property are you animating etc? From your video, I could not see the fade in/out at all in Play mode (it was just visible all the time). Here is a little video I did a while back - lots of stuff you don't need, but it shows how I animated the background in/out. (I am not an expert, but this worked for me.)

https://www.youtube.com/watch?v=r74MUi_FZ4g

I did the fade by keyframing the opacity of the image via the colour. When I play the game, the small alpha bar at the bottom of the colour does go down but the image's opacity onscreen stays the same.

At around 5:30 in the video above I animated the alpha value of the color property of the RawImage component that I used. Which color property did you animate? Materials sometimes cause caching problems I think which is why I am trying to be precise exactly which property of which component you are animating.