Is the beagle a puppy or perhaps a teen? The dog may be too active for your son. It's great to be around a puppy or young dog some of the time but all the time may just be too much.
I suggest that a better choice is an older, calm dog who is already used to children. That way he doesn't have to pay attention to the dog any more than he wants to. An older dog is satisfied even when he doesn't get a lot of attention.
We have an old dog. I think he's 16 years old. He loves to get outside and run on a leash and the grandkids love to do that with him. Inside, they may pet him while they're both sitting down watching TV. But mostly they don't pay much attention to him nor he to them after the first 15-20 minutes after they get here.
I'm guessing that he doesn't want him around because he's competition for your attention. At 4 he doesn't know that nor can he verbalize it.