in this code i have a button that when clicked temporarily moves the mouse position close to the center of the screen for a few seconds and then moves back to the button. can someone explain why it doesn't just stay in the center of the screen? I don't want the mouse cursor to move back to the button

Code:
#include <acknex.h>

BMAP* cursor = "mouse_cursor.png";
BMAP* test_button = "test_button.jpg";

var button_pressed = 0; 

function main()
{
	video_mode = 11;
	video_screen = 1;
	mouse_mode = 3;
	mouse_map = cursor;
	level_load(""); 
	//
	while(1)
	{
		if(key_esc) sys_exit(NULL);
		if(button_pressed == 1) vec_set(mouse_pos,vector(600,500,0));//put the mouse close to the center of screen
		wait(1);
	}		
}

function test()
{
	button_pressed = 1;	
	wait(8);
	button_pressed = 0;
}

PANEL* test_panel =
{ 
   layer = 2; 
   pos_x = 1400; 
   pos_y = 250; 
   size_x = 300; 
   size_y = 800; 
   button(20,20,test_button,test_button,test_button,test,NULL,NULL);
   flags = SHOW;
}