Its a problem.
Constants allude to pure numbers so indeed its funny that a constant should have units of measurement.
It's a fitting problem. You find, or guess that something depends on something else, proportionally like when x goes from 3 to 4, y goes from 6 to 8, (so y=2*x where 2 is a constant) or inversely proportional (y=x/2), so when you are satisfied that you found everything that can affect that something you pretty much have your equation, like y=ax^2+bx+c the simple quadratic in one dimension or something like w=xy.
The last step is to add constants so that the numbers, the results match.
However if by your units of measurement principles the units don't match, you got a problem. You will sacrifice for this if your constant holds even though it has units, but perhaps be aware that there is more to the equation than this simplification or of course that your original idea of units of measurement has a flaw. Its more of a mess to redefine your first principles, i.e speed is not meter/seconds so lets leave that out for now.
The gravitational equation in this form is also very similar to Coulombs law, too similar in fact, both are mostly guides to say that the force is proportional to the masses of the objects and inversely proportional to the square of their distance (in gravity's case)
You do get neat squares with the gravitational force, i.e. (kg/m)2 so if the whole thing is squared then you might wonder what kg/m is.
For example: Squares appear when you are adding stuff through integration, integrals another fine mathematical concept which however, at least graphically, is an approximation.
So we say if y=x^2 then dy/dx=2x and integration being the reverse of differentiation, using notation 'Integral of x' as I(x), then I(2x)=2*(x^2)/2 + K (we always add a constant in integration for the missing part.
So perhaps the (gravitational) force is f=I(something) so that it ends up squared.
Force is a funny animal. You got things like impulses like you got things like energy, work and power all of them concepts in physics, connected. For example iirc work=power*time but that's just common sense talking so I'll stop here.
To start thinking about kg/m and what that is, one thing that popped to mind, these two are connected when something travels a distance, how does the distance depend on the mass? Well, certainly when you got friction, the mass matters. You can think about density too, which is mass/volume.
So F~volume^2 and perhaps F=volumesomething, that brings it back to kgm/s^2. something that in the perceivable local is stable, constant. Mind you if F=I(x) and it has m/s^2 in it, there is an integral relation between speed and acceleration (s=vt+at/2) where s is distance, v is speed, a is acceleration and t time. Keep in mind that integration is subjective too, you integrate over something so if w=xy and both x and y are variables you can integrate w over x and you can integrate w over y. These are/(can be) additive provided that they are independent coz if y=f(x) you can go to single variable w=xf(x) => w=g(x)