Fix for the issue of device-id getting hardcoded for position-ids during Tracing for Distillbert (#12290)
* registered buffer for position-ids to address issues similar to issue#5664
* added comment
* added the flag to prevent from adding the buffer into the state_dict