This is not a bug per se, because as far as mIRC is concerned, those numbers are in fact the same. Internally, mIRC stores numbers as IEEE745 64-bit floating point numbers ("doubles"), which are supported natively by your CPU, but allow accurate representation of integers "only" up to 2**53, which your examples exceed. This limitation can be found throughout all parts of mIRC that involves parsing strings as numbers. A simple example is $calc: $calc(22555921969088118
1) and $calc(22555921969088118
5) both return 22555921969088118
0.
mIRC could implement support for arbitrary-precision numbers, but this would come at the cost of performance for pretty much everything involving numbers. Alternatively, you as a scripter can work around some of these issues. In your use case, you can force mIRC to not interpret such strings as numbers, e.g. by prefixing them with some text:
var %num1 = 225559219690881181, %num2 = 225559219690881185
echo -ag $iif(%num1 == %num2,It's a match!,Doesn't match!)
echo -ag $iif(x $+ %num1 == x $+ %num2,It's a match!,Doesn't match!)