I'm not sure if it's %Text at all.

Made a small example:

Class dc.test Extends %Persistent
{

Index mySimilarityIndex On SettingsJSON(KEYS) [ Data = SettingsJSON(ELEMENTS) ];

Property SettingsJSON As %Text(LANGUAGECLASS "%Text.English"MAXLEN 3600000SIMILARITYINDEX "mySimilarityIndex");

ClassMethod Test()
{
  ..%KillExtent()
  
  json=$tr($j("",3600000)," ","0")
  &sql(insert into del.t(SettingsJSONvalues(:json))
  
  w $l(json),":",SQLCODE
}

}

Output:
3600000:0

Class dc.test Extends %Persistent
{

Property As %Integer;

ClassMethod Test()
{

  ..%KillExtent()

  &sql(insert into dc.test(Fvalues(22))
  &sql(insert into dc.test(Fvalues(11))

  label "00007I0Q"
  &sql(select ID into :cnt from dc.test where ID :label)
  
  SQLCODE,":",cnt
}

}

Output for Caché 2018.1:

100:00007I0Q

Output for IRIS 2021.2:

100:

PS: it is a pity that my answer was ignored.

Any event that occurs outside of the modal group (such as a mouse click) automatically hides the modal groupproof.

Use Popup windows with modal=yes or Dialogs.

PS: if you really need to use "Model Groups", then you need to do two things for this:

  1. override the method onCanEndModalHandler
  2. override the method hideGroup(). This is necessary to prohibit the close button in the upper right corner
 
Here is a small variant:
Is it OK to use this partially rebuilt index if I don't care about data that isn't indexed? Did you do this before?

I didn't build indexes manually, except for tests. If the index is not built for all data, then the query will see only the data for which the index exists.

 
Try simple example:

If we open the source code of the class for the Status field, we will see the following:

Class Ens.DataType.MessageStatus Extends %Integer
{

Parameter DISPLAYLIST = ",Created,Queued,Delivered,Discarded,Suspended,Deferred,Aborted,Error,Completed";

Parameter VALUELIST = ",1,2,3,4,5,6,7,8,9";

}

Therefore , the following conclusions can be drawn:

  1. For Embedded SQL the RuntimeMode is Logical
  2. For SQL Explorer (Portal) the RuntimeMode is Display

Hence the leapfrog in the results.

Try this:

ClassMethod OnStartRequest() As %Status
{
  #dim %response As %CSP.Response
  
  ;s %response.ContentType="text/html",%response.Expires=-1
  %response.Status=##class(%CSP.REST).#HTTP403FORBIDDEN
  q $$$OK
}

Or this:

/// Event handler for <b>PreHTTP</b> event: this is invoked before
/// the HTTP headers for a CSP page have been sent.  All changes to the
/// <class>%CSP.Response</class> class, such as adding cookies, HTTP headers,
/// setting the content type etc. must be made from within the OnPreHTTP() method.
/// Also changes to the state of the CSP application such as changing
/// %session.EndSession or %session.AppTimeout must be made within the OnPreHTTP() method.
/// It is prefered that changes to %session.Preserve are also made in the OnPreHTTP() method
/// as this is more efficient, although it is supported in any section of the page.
/// Return <b>0</b> to prevent <method>OnPage</method> from being called.
ClassMethod OnPreHTTP() As %Boolean ServerOnly = 1 ]
{
  %response.Status="403 Forbidden"
  0
}

We need to look at your full code, since there is nothing suspicious in the specified piece of code. I made a small example and there is no highlighting of the last line:

 
Source code

I confirm (used the following code):

#include %systemInclude
n
try{

  sql="select * from (select 0 field union select 1) where 0=1"
  
  #dim rs As %SQL.StatementResult=##class(%SQL.Statement).%ExecDirect(,sql)
  rs.%SQLCODE
  
  s st ##class(%SQL.Statement).%New()
  $$$ThrowOnError(st.%Prepare(sql))
  rs st.%Execute()
  !,"---",!,rs.%SQLCODE
  
  &sql(select * from (select field union select 1) where 0=1)
  !,"---",!,SQLCODE

}catch(ex){
  "Error "ex.DisplayString(),!
}

Output:
0
---
0
---
100

Quote from the documentation:

When retrieving results, first check for successful execution by examining %SQLCODE. For many statement types, success/failure is all that is needed. The %SQLCODE property contains the SQL error code value. Successful completion values are 0 (successful completion) and 100 (the operation has either found no data or reached the end of the data).proof