Closing curly brace disappears

whenever i type curly braces after a loop or something and hit enter the closing curly brace. disappears.like when i type for example for(int i=0;i<t;i++){i hit enter here }.then the closing tag disappears .but when i go back and retype it doesnt.I dont know if its my mistake or is it a bug someone explain .

Please share a screen recording if possible