The "persecution" of Isaac [the son born of the spirit] by Ishmael [the son born of the flesh] seems relatively innocuous in the biblical text, but if we look deeper we can understand that it may have been serious, indeed. If so, Paul's term is apt.
The RSV translates the episode in Gen 21:9 in the most innocent terms:
But Sarah saw the son of Hagar the Egyptian, whom she had borne to
Abraham, playing with her son Isaac.
But the verb here (צָחַק) is also translated as "mocking" or "jesting." KJV opted to the following:
And Sarah saw the son of Hagar the Egyptian, which she had born unto
Abraham, mocking.
However, mocking is hardly "persecuting." We should also consider this from the standpoint of the story of Ishmael and Isaac being a reiteration of the story of Cain and Abel. In the Cain/Abel relationship, the elder son killed the younger son. In the Ishmael/Isaac relationship, the same danger existed. Thus, the "mocking" of Isaac by Ishmael was not a matter to be taken lightly.
To understand Paul's language we also need to consider the developing pharisaic/rabbinical traditions about the relationship between Ishmael and Isaac. These traditions were any that circulated in his day.
In one tradition, Ishmael lured Isaac to the fields where he cast
arrows at him, in order to get rid of him (Gen. R. 53). It was for
this reason Sarah insisted on Ishmael and his mother being sent away.
The ancient rabbi Simeon ben Yochai, stated that Ishmael refused to
accept that Isaac would be Abraham's chief heir, maintaining that he
(Ishmael) should receive two-thirds of the inheritance (Pirke R. El.
30, and so on). See [Ishmael in the New World Encyclopedia] (https://www.newworldencyclopedia.org/entry/Ishmael)
If Paul believed that Ishmael attacked Isaac with arrows and intended to make himself Abraham's heir, then "persecuted" is not too strong a word. Ishmael was older, bigger and stronger. He should have protected his younger brother, but apparently, Ishmael threatened serious harm to him. These facts provide a basis for us to understand why Paul used the term "persecuted" in Gal. 4.