I have this problem a good bit but I have this fun little thing where I don’t just lose inspiration, I lose the train of thought and can’t get back into whatever I’m working on. So this often leads to me giving up and finding a new idea that gives me motivation. Which isn’t great, but it means that I’m not stuck staring at whatever thing I’ve left unfinished.
So sometimes I just need to wait long enough for another idea, or I listen to music or watch a movie. Other times I can’t finish what it is I’m working because of life calling my name, and usually when I try to pick it back up I either get it or lose it again. I also intentionally daydream myself to sleep so sometimes I just get new ideas from that.