It is normal to get hungry soon after your workout because your body has used up most of the glycogen (sugar in your muscle) after exercising. When this happens, your blood sugar level will drop and make you feel hungry!
It is still safe to continue your fast with adjustment to your workout time. I will recommend you do your workout closer to your fasting end time.
For example, if you’re about to end your fasting and start eating at 10 AM, finish your workout 30 minutes to 1 hour before you start eating. This way, you will immediately get your first meals as a post-workout recovery.
Another way to avoid feeling hungry soon after a workout is to do your workout during your eating window. This way, you can have a recovery meal soon after a workout, without waiting for too long before your fasting ends.