I found a way to render the sky sphere behind everthing else. Set screen_color and sky_color to (0,0,0).

Then give the sky sphere FLAG1 and create another view which only renders the sky behind the level:

Code:
vec_set(sky_color,nullvector);
vec_set(screen_color,nullvector);
	
VIEW* camera_sky=view_create(-999999);
camera_sky.size_x=camera.size_x;
camera_sky.size_y=camera.size_y;
set(camera_sky,NOENT|SHOW|UNTOUCHABLE|NOPARTICLE|NOWORLD|NOFOG|NOSKY);
camera_sky.genius=ent_sky_sphere;

set(camera,NOFLAG1);
	
while(1)
{
	vec_set(camera_sky.x,camera.x);
	vec_set(camera_sky.pan,camera.pan);
		
	wait(1);	
}