You can try to stomp the rythm with your foot on the strong beats (1,2,3,4).
Try turning the metronom off for some bars and turn it on again. Check if you are still in sync with the metronom.
I was always struggling with the rythm too. What helped me really, was to subdivide the bars. I didn't see the bars as "one", "two", "three", "four", i look at them like "one", "and", "two" "and" [..], or even "one", "e", "and", "a", "two", "e", "and", "a" [...].
This will ofc need some time but sooner or later you will develope a feeling in your head. What i mean you will no longer need to count the bars in your head like "one", "two", "three", "four", its more like you are just feeling it.
When there is much room where nothing is palyed, its harder to keep in sync. One more trick i am using for this is to hum a melody in my head, which i can use to fill the gaps and keep in sync.