When a mathematician says something is a scalar, say on the plane, they mean that it associates to points on the plane real numbers. When a physicist says something is a scalar, they mean that if we put a cartesian coordinate system on the plane and look at the value of this thing, and then rotate the coordinate system and look at the value again, the two values agree. But in the math definition there would be no reason to mention rotations, or the metric, or isometries of the metric, these are irrelevant to the definition of a scalar.
Now I know there are some things that are scalars under rotations but not under rotations + reflections, which would seem to mean that such a thing couldn't be considered a scalar in the math sense, because scalars in math are manifestly coordinate independent. However if we were only interested in rotations of the coordinate system, then a physicist would call it a scalar.
So it seems to me that physicists only talk about scalars with respect to certain group actions, which don't enter the picture when a mathematician talks about scalars, and this leaves me a bit confused as to in what sense they are the same.