Look at it this way, we have$$BGBGBGBG$$
We have $4$ ways for first boy, $4$ ways for first girl, $3$ ways for second boy, $3$ ways for second girl, and so on.
So we have $$4*4*3*3*2*2*1*1 = 4!*4!$$
But note that we could have also started with the pattern $$GBGBGBGB$$ so we need to double our previous answer, giving the desired result.
Edit: The original answer you found was number of ways only girls were not sitting next to each other. For your method to work, you need to complete an additional step where you subtract number of ways that girls aren't sitting next to each other but some of the boys are.
To find this number, note that girls must be on both ends of the line. So now we fill up our holes: $$GB\_ GB \_ GB\_ G$$
We have $3$ slots to choose for the last remaining boy. Therefore the number of ways girls are alternating but boys are touching is $C(3,1) = 3$ (and don't forget your permutations of these $3$ arrangements) So our new answer would be:
$$C(5,4) *4!*4! - C(3,1) *4!*4!$$
$$= 5*4!*4! - 3*4!*4!$$
$$=(5-3)*4!*4!$$
$$=2*4!*4!$$
Personally I feel this is a longer and slightly more complicated way to solve this problem, but it shows that your method does work if you include the extra step to correct it