yes i mean that: i suppose you are using a Immediate geometry to create the trail, and i suppose you create a new array of point every frame, and pass this array of points into the immediate geometry using something similar to:
for p in array:
$immediate_geometry.add_vertex(p)
if this is what you do, you can keep doing that but limit the number of points to 4 for each turn. Eg:
var arr=PoolVector2Array()
func _ready();
arr.append(Vector2(0,0))
func _process():
if turning:
arr.append(Vector2(motorcycle.translation.x, motorcycle.translation.z))
$immediate_geometry.clear()
$immediate_geometry.begin()
for p in arr:
$immediate_geometry.add_vertex(Vector3(p.x, 0, p.y))
$immediate_geometry.add_vertex(Vector3(p.x, trail_height, p.y))
$immediate_geometry.add_vertex(Vector3(motorcycle.x, 0, motorcycle.z))
$immediate_geometry.add_vertex(Vector3(motorcycle.translation.x, trail_height, motorcycle.translation.z))
$immediate_geometry.end