Why don't we consider the change in $g$ while determining the acceleration of a free falling object? $$F=mg$$
Why is the acceleration constant? Shouldn't it change as it is thrown upward as the distance from the earth increases.I know the effects would be very negligible but is there any equation to account for this change? How can we apply it to real life?
$$\frac{dg}{dr} =\lim_{h \to 0} \left[  \frac{Gm_{earth}}{(r+h)^2}-\frac{Gm_{earth}}{r^2}\right] \frac{1}{h}=\frac{-2Gm_{earth}}{r^3} $$
 A: The point of:
$$ F = m\ddot r = mg $$
is that it is tractable for introductory physics classes. It is also sufficient to solve many problems to reasonable accuracy.
If you want to get exact, you're equation is fine. For a perfectly spherical non-rotating Earth of uniform density that does not have a moon, or an atmosphere.
For a realistic Earth:

you have much more than:
$$ F = GM\frac m {r^2} $$
There is the geoid, which is the measured/modeled equi-potential surface (EGM08 involves several thousand orders of spherical harmonics), and the local vertical deflection (gravity doesn't always point down).
The Earth rotates, so you have Coriolis and Eotvos effects (which are required for long range ballistics).
The Moon's (Sun's) gravitation force is on the order of $g/300000$ ($g/1560$); however, to include them you must include the non-inertial motion caused by orbital motion.
And that's all just a Newtonian approximation to the full general relativistic treatment, and it still doesn't include air resistance or radiation pressure.
A: For simple near-Earth calculations, the value of $g$ changes very little. Using your derivitive, the value of $g$ changes at a rate of -3.08$\times$10$^{-6}$ m/s$^2$ per meter of height. So, even at 10 km of elevation (where airliners fly), the value of $g$ has only changed by about 0.01 m/s$^2$. Compared to the value of 9.8 m/s$^2$, this is entirely negligible. You have to go up to the orbit of the International Space Station (400 km) to get a change in $g$ of 10%.
A: $g$ is normally considered constant in cases like this, because over small scales that's a good approximation: it's easy to see that at a height $h$ above the surface, then
$$\frac{\Delta g}{g} \approx \frac{R^2}{(R + h)^2}\quad\text{and $=$ for a spherical Earth with no Moon etc}$$
And you can plug in values for this: for $h = 100\,\mathrm{m}$ it's about $\Delta g / g \approx 3.1\times 10^{-5}$.  If you wanted to compute a trajectory in air this is far less than the error you would get by, for instance, ignoring air resistance and also less than the variation you would get by not knowing where on the planet you were throwing the ball: $\Delta g / g \approx 2\times 10^{-3}$ between the equator and the poles.
But if you are want to compute trajectories very accurately in a vacuum chamber or, more realistically, if you want to compute the trajectory of some object which you are planning to throw really far up, then you do need to treat $g$ as being non-constant, and instead use the proper expression for the force between two bodies: $F = -Gm_1 m_2/r^2$.  Well, famously the person who came up with that law also came up with exact solutions for it in the two-body case: Isaac Newton.
So, yes, in general you need to deal with the change in $g$ (although solutions in this case are not usually expressed in terms of $g$), and we know how to do that.
There is an interesting case where you can treat $g$ as locally constant, but you need to take into account factors which alter its value, and in particular both height and changes in $g$ caused by other factors: very good pendulum clocks are sensitive to the value of $g$ and to changes in its value.  So, for instance, you can in principle see changes in their timekeeping caused by their height (in practice this is probably rather hard to detect because the perturbation caused by physically moving the clock will cause many other factors to change), and in practice you can see the changes in their timekeeping caused by changes in $g$ due to the Moon (either directly or by the deformation of the Earth it causes).  This may have been suspected but was not known until people could compare the timekeeping of these clocks with atomic time standards, of course: until after they ceased to serve any useful purpose as timekeepers in other words.
