will these two give same output, in terms of uniqueness of the events. Or precisely, will the random number reinitialised again and again after each run/beamOn 10^5 in first case?
Yes, you will get different unique events with each /run/beamOn in a single macro file. If you want unique events across multiple jobs, then you need to have your own method to set unique random seeds (people often use time() for that, or parse a UUID from libuuid, or something similar).