Freeze in frappe call not working

I am using the following syntax to freeze the screen while processing

frappe.xcall('method', {
		data: data,
		freeze:true, freeze_message:__("Getting Data")
	}).then(r => {
		console.log('called')
	});

To test if it really freezes the screen I added a sleep function in my python code, but it did not show the freeze msg, how exactly can we test that if data processing takes time this will work?